mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-131798: Add _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW (GH-134268)
This commit is contained in:
parent
1fbb0603a8
commit
a7f317d730
8 changed files with 121 additions and 53 deletions
34
Python/executor_cases.c.h
generated
34
Python/executor_cases.c.h
generated
|
@ -7103,6 +7103,40 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW: {
|
||||
_PyStackRef pop2;
|
||||
_PyStackRef pop1;
|
||||
_PyStackRef null;
|
||||
_PyStackRef callable;
|
||||
_PyStackRef value;
|
||||
pop2 = stack_pointer[-1];
|
||||
pop1 = stack_pointer[-2];
|
||||
null = stack_pointer[-3];
|
||||
callable = stack_pointer[-4];
|
||||
PyObject *ptr = (PyObject *)CURRENT_OPERAND0();
|
||||
stack_pointer += -1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyStackRef_CLOSE(pop2);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
stack_pointer += -1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyStackRef_CLOSE(pop1);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
(void)null;
|
||||
stack_pointer += -2;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyStackRef_CLOSE(callable);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
value = PyStackRef_FromPyObjectImmortal(ptr);
|
||||
stack_pointer[0] = value;
|
||||
stack_pointer += 1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _CHECK_FUNCTION: {
|
||||
uint32_t func_version = (uint32_t)CURRENT_OPERAND0();
|
||||
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue