mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +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
4
Python/optimizer_cases.c.h
generated
4
Python/optimizer_cases.c.h
generated
|
@ -58,7 +58,9 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _LOAD_CONST: {
|
||||
/* _LOAD_CONST is not a viable micro-op for tier 2 */
|
||||
|
||||
case _LOAD_CONST_MORTAL: {
|
||||
_Py_UopsSymbol *value;
|
||||
PyObject *val = PyTuple_GET_ITEM(co->co_consts, this_instr->oparg);
|
||||
int opcode = _Py_IsImmortal(val) ? _LOAD_CONST_INLINE_BORROW : _LOAD_CONST_INLINE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue