mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
GH-128682: Account for escapes in DECREF_INPUTS
(GH-129953)
* Handle escapes in DECREF_INPUTS * Mark a few more functions as escaping * Replace DECREF_INPUTS with PyStackRef_CLOSE where possible
This commit is contained in:
parent
3e222e3a15
commit
72f56654d0
18 changed files with 2228 additions and 921 deletions
|
@ -118,7 +118,9 @@
|
|||
#ifdef Py_DEBUG
|
||||
#define LLTRACE_RESUME_FRAME() \
|
||||
do { \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer); \
|
||||
int lltrace = maybe_lltrace_resume_frame(frame, GLOBALS()); \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame); \
|
||||
if (lltrace < 0) { \
|
||||
JUMP_TO_LABEL(exit_unwind); \
|
||||
} \
|
||||
|
@ -409,17 +411,21 @@ do { \
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#define GOTO_TIER_ONE(TARGET) \
|
||||
do { \
|
||||
next_instr = (TARGET); \
|
||||
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \
|
||||
Py_CLEAR(tstate->previous_executor); \
|
||||
if (next_instr == NULL) { \
|
||||
next_instr = frame->instr_ptr; \
|
||||
goto error; \
|
||||
} \
|
||||
DISPATCH(); \
|
||||
} while (0)
|
||||
#define GOTO_TIER_ONE(TARGET) \
|
||||
do \
|
||||
{ \
|
||||
next_instr = (TARGET); \
|
||||
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist); \
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer); \
|
||||
Py_CLEAR(tstate->previous_executor); \
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame); \
|
||||
if (next_instr == NULL) \
|
||||
{ \
|
||||
next_instr = frame->instr_ptr; \
|
||||
goto error; \
|
||||
} \
|
||||
DISPATCH(); \
|
||||
} while (0)
|
||||
|
||||
#define CURRENT_OPARG() (next_uop[-1].oparg)
|
||||
#define CURRENT_OPERAND0() (next_uop[-1].operand0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue