mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
GH-113710: Add a tier 2 peephole optimization pass. (GH-114487)
* Convert _LOAD_CONST to inline versions * Remove PEP 523 checks
This commit is contained in:
parent
1e4f00ebd8
commit
384429d1c0
7 changed files with 66 additions and 6 deletions
9
Python/executor_cases.c.h
generated
9
Python/executor_cases.c.h
generated
|
|
@ -3390,6 +3390,15 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _LOAD_CONST_INLINE: {
|
||||
PyObject *value;
|
||||
PyObject *ptr = (PyObject *)CURRENT_OPERAND();
|
||||
value = Py_NewRef(ptr);
|
||||
stack_pointer[0] = value;
|
||||
stack_pointer += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
case _LOAD_CONST_INLINE_BORROW: {
|
||||
PyObject *value;
|
||||
PyObject *ptr = (PyObject *)CURRENT_OPERAND();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue