mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
GH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONST_[IM]MORTAL (GH-128708)
This commit is contained in:
parent
29fe8072cf
commit
ddd959987c
14 changed files with 121 additions and 65 deletions
7
Python/executor_cases.c.h
generated
7
Python/executor_cases.c.h
generated
|
@ -209,10 +209,13 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _LOAD_CONST: {
|
||||
/* _LOAD_CONST is not a viable micro-op for tier 2 because it uses the 'this_instr' variable */
|
||||
|
||||
case _LOAD_CONST_MORTAL: {
|
||||
_PyStackRef value;
|
||||
oparg = CURRENT_OPARG();
|
||||
value = PyStackRef_FromPyObjectNew(GETITEM(FRAME_CO_CONSTS, oparg));
|
||||
PyObject *obj = GETITEM(FRAME_CO_CONSTS, oparg);
|
||||
value = PyStackRef_FromPyObjectNew(obj);
|
||||
stack_pointer[0] = value;
|
||||
stack_pointer += 1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue