Skip to content

Commit 86fd1b1

Browse files
Pull in main
2 parents 80d19b3 + e28b0dc commit 86fd1b1

29 files changed

Lines changed: 1182 additions & 27 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Programs/test_frozenmain.h generated
9090
Python/Python-ast.c generated
9191
Python/executor_cases.c.h generated
9292
Python/generated_cases.c.h generated
93+
Python/abstract_interp_cases.c.h generated
9394
Python/opcode_targets.h generated
9495
Python/stdlib_module_names.h generated
9596
Tools/peg_generator/pegen/grammar_parser.py generated

Include/cpython/optimizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typedef struct _PyExecutorObject {
2222
typedef struct _PyOptimizerObject _PyOptimizerObject;
2323

2424
/* Should return > 0 if a new executor is created. O if no executor is produced and < 0 if an error occurred. */
25-
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **);
25+
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **, int curr_stackentries);
2626

2727
typedef struct _PyOptimizerObject {
2828
PyObject_HEAD

Include/internal/pycore_fileutils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ extern int _Py_add_relfile(wchar_t *dirname,
260260
size_t bufsize);
261261
extern size_t _Py_find_basename(const wchar_t *filename);
262262
PyAPI_FUNC(wchar_t*) _Py_normpath(wchar_t *path, Py_ssize_t size);
263+
extern wchar_t *_Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *length);
263264

264265
// The Windows Games API family does not provide these functions
265266
// so provide our own implementations. Remove them in case they get added

Include/internal/pycore_opcode_metadata.h

Lines changed: 142 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef Py_INTERNAL_OPTIMIZER_H
2+
#define Py_INTERNAL_OPTIMIZER_H
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
7+
#ifndef Py_BUILD_CORE
8+
# error "this header requires Py_BUILD_CORE define"
9+
#endif
10+
11+
#include "pycore_uops.h"
12+
13+
int _Py_uop_analyze_and_optimize(PyCodeObject *code,
14+
_PyUOpInstruction *trace, int trace_len, int curr_stackentries);
15+
16+
17+
#ifdef __cplusplus
18+
}
19+
#endif
20+
#endif /* !Py_INTERNAL_OPTIMIZER_H */

Include/internal/pycore_uops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
#define _Py_UOP_MAX_TRACE_LENGTH 32
11+
#define _Py_UOP_MAX_TRACE_LENGTH 64
1212

1313
typedef struct {
1414
uint32_t opcode;

0 commit comments

Comments
 (0)