GH-131798: Add _POP_CALL_TWO_LOAD_CONST_INLINE_BORROW (GH-134268)

This commit is contained in:
Tomas R. 2025-05-19 18:00:53 -04:00 committed by GitHub
parent 1fbb0603a8
commit a7f317d730
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 121 additions and 53 deletions

View file

@ -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));