mirror of
https://github.com/python/cpython.git
synced 2026-06-08 02:41:11 +00:00
gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625)
This commit is contained in:
parent
2531cd337b
commit
39bd44fc70
12 changed files with 96 additions and 43 deletions
6
Python/executor_cases.c.h
generated
6
Python/executor_cases.c.h
generated
|
|
@ -9396,7 +9396,7 @@
|
|||
_PyStackRef value;
|
||||
oparg = CURRENT_OPARG();
|
||||
assert(oparg < NUM_COMMON_CONSTANTS);
|
||||
value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]);
|
||||
value = PyStackRef_DupImmortal(tstate->interp->common_consts[oparg]);
|
||||
_tos_cache0 = value;
|
||||
SET_CURRENT_CACHED_VALUES(1);
|
||||
assert(WITHIN_STACK_BOUNDS_IGNORING_CACHE());
|
||||
|
|
@ -9410,7 +9410,7 @@
|
|||
_PyStackRef _stack_item_0 = _tos_cache0;
|
||||
oparg = CURRENT_OPARG();
|
||||
assert(oparg < NUM_COMMON_CONSTANTS);
|
||||
value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]);
|
||||
value = PyStackRef_DupImmortal(tstate->interp->common_consts[oparg]);
|
||||
_tos_cache1 = value;
|
||||
_tos_cache0 = _stack_item_0;
|
||||
SET_CURRENT_CACHED_VALUES(2);
|
||||
|
|
@ -9426,7 +9426,7 @@
|
|||
_PyStackRef _stack_item_1 = _tos_cache1;
|
||||
oparg = CURRENT_OPARG();
|
||||
assert(oparg < NUM_COMMON_CONSTANTS);
|
||||
value = PyStackRef_FromPyObjectNew(tstate->interp->common_consts[oparg]);
|
||||
value = PyStackRef_DupImmortal(tstate->interp->common_consts[oparg]);
|
||||
_tos_cache2 = value;
|
||||
_tos_cache1 = _stack_item_1;
|
||||
_tos_cache0 = _stack_item_0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue