Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ PyAPI_FUNC(PyObject *) _PyEval_GetAwaitable(PyObject *iterable, int oparg);
PyAPI_FUNC(PyObject *) _PyEval_LoadName(PyThreadState *tstate, _PyInterpreterFrame *frame, PyObject *name);
PyAPI_FUNC(int)
_Py_Check_ArgsIterable(PyThreadState *tstate, PyObject *func, PyObject *args);
PyAPI_FUNC(_PyStackRef) _PyEval_GetIter(_PyStackRef iterable, _PyStackRef *null_or_index, int yield_from);

/*
* Indicate whether a special method of given 'oparg' can use the (improved)
Expand Down
6 changes: 3 additions & 3 deletions Include/internal/pycore_interpframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ static inline _PyStackRef *_PyFrame_Stackbase(_PyInterpreterFrame *f) {
return (f->localsplus + _PyFrame_GetCode(f)->co_nlocalsplus);
}

static inline _PyStackRef _PyFrame_StackPeek(_PyInterpreterFrame *f) {
static inline _PyStackRef _PyFrame_StackPeek(_PyInterpreterFrame *f, int depth) {
assert(f->stackpointer > _PyFrame_Stackbase(f));
assert(!PyStackRef_IsNull(f->stackpointer[-1]));
return f->stackpointer[-1];
assert(!PyStackRef_IsNull(f->stackpointer[-depth]));
return f->stackpointer[-depth];
}

static inline _PyStackRef _PyFrame_StackPop(_PyInterpreterFrame *f) {
Expand Down
5 changes: 3 additions & 2 deletions Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ Known values:
Python 3.15a4 3659 (Add CALL_FUNCTION_EX specialization)
Python 3.15a4 3660 (Change generator preamble code)
Python 3.15a4 3661 (Lazy imports IMPORT_NAME opcode changes)
Python 3.15a6 3662 (Add counter to RESUME)
Python 3.15a8 3662 (Add counter to RESUME)
Python 3.15a8 3663 (Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER)
Python 3.16 will start with 3700
Expand All @@ -306,7 +307,7 @@ PC/launcher.c must also be updated.
*/

#define PYC_MAGIC_NUMBER 3662
#define PYC_MAGIC_NUMBER 3663
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
32 changes: 13 additions & 19 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Include/internal/pycore_opcode_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ extern "C" {
#define RESUME_OPARG_LOCATION_MASK 0x3
#define RESUME_OPARG_DEPTH1_MASK 0x4

#define GET_ITER_YIELD_FROM 1
#define GET_ITER_YIELD_FROM_NO_CHECK 2
#define GET_ITER_YIELD_FROM_CORO_CHECK 3

#ifdef __cplusplus
}
#endif
Expand Down
Loading
Loading