mirror of
https://github.com/python/cpython.git
synced 2026-04-15 16:21:24 +00:00
gh-145866: Convert SET_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-145979)
This commit is contained in:
parent
982459132b
commit
0d37e423d5
10 changed files with 1030 additions and 981 deletions
15
Python/executor_cases.c.h
generated
15
Python/executor_cases.c.h
generated
|
|
@ -8571,11 +8571,12 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _SET_UPDATE_r10: {
|
||||
case _SET_UPDATE_r11: {
|
||||
CHECK_CURRENT_CACHED_VALUES(1);
|
||||
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
|
||||
_PyStackRef iterable;
|
||||
_PyStackRef set;
|
||||
_PyStackRef i;
|
||||
_PyStackRef _stack_item_0 = _tos_cache0;
|
||||
oparg = CURRENT_OPARG();
|
||||
iterable = _stack_item_0;
|
||||
|
|
@ -8587,19 +8588,17 @@
|
|||
int err = _PySet_Update(PyStackRef_AsPyObjectBorrow(set),
|
||||
PyStackRef_AsPyObjectBorrow(iterable));
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
stack_pointer += -1;
|
||||
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyStackRef_CLOSE(iterable);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
if (err < 0) {
|
||||
SET_CURRENT_CACHED_VALUES(0);
|
||||
JUMP_TO_ERROR();
|
||||
}
|
||||
_tos_cache0 = PyStackRef_ZERO_BITS;
|
||||
i = iterable;
|
||||
_tos_cache0 = i;
|
||||
_tos_cache1 = PyStackRef_ZERO_BITS;
|
||||
_tos_cache2 = PyStackRef_ZERO_BITS;
|
||||
SET_CURRENT_CACHED_VALUES(0);
|
||||
SET_CURRENT_CACHED_VALUES(1);
|
||||
stack_pointer += -1;
|
||||
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
|
||||
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue