Skip to content

Commit da071fa

Browse files
authored
GH-119866: Spill the stack around escaping calls. (GH-124392)
* Spill the evaluation around escaping calls in the generated interpreter and JIT. * The code generator tracks live, cached values so they can be saved to memory when needed. * Spills the stack pointer around escaping calls, so that the exact stack is visible to the cycle GC.
1 parent cda3b5a commit da071fa

25 files changed

+3839
-2032
lines changed

Include/internal/pycore_ceval.h

+3
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ typedef struct _special_method {
251251
} _Py_SpecialMethod;
252252

253253
PyAPI_DATA(const _Py_SpecialMethod) _Py_SpecialMethods[];
254+
PyAPI_DATA(const size_t) _Py_FunctionAttributeOffsets[];
254255

255256
PyAPI_FUNC(int) _PyEval_CheckExceptStarTypeValid(PyThreadState *tstate, PyObject* right);
256257
PyAPI_FUNC(int) _PyEval_CheckExceptTypeValid(PyThreadState *tstate, PyObject* right);
@@ -274,6 +275,8 @@ PyAPI_FUNC(PyObject *) _PyEval_GetANext(PyObject *aiter);
274275
PyAPI_FUNC(void) _PyEval_LoadGlobalStackRef(PyObject *globals, PyObject *builtins, PyObject *name, _PyStackRef *writeto);
275276
PyAPI_FUNC(PyObject *) _PyEval_GetAwaitable(PyObject *iterable, int oparg);
276277
PyAPI_FUNC(PyObject *) _PyEval_LoadName(PyThreadState *tstate, _PyInterpreterFrame *frame, PyObject *name);
278+
PyAPI_FUNC(int)
279+
_Py_Check_ArgsIterable(PyThreadState *tstate, PyObject *func, PyObject *args);
277280

278281
/* Bits that can be set in PyThreadState.eval_breaker */
279282
#define _PY_GIL_DROP_REQUEST_BIT (1U << 0)

Include/internal/pycore_opcode_metadata.h

+18-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)