diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index b956a3b78c8101..d6ec7fd69b2ef4 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -6054,10 +6054,9 @@ } case _ITER_CHECK_RANGE____GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE: { - _PyStackRef iter; - _PyStackRef next; // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -6067,6 +6066,8 @@ } // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); if (r->len <= 0) { @@ -6076,6 +6077,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -6085,18 +6089,17 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(2); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_CHECK_LIST____GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST: { - _PyStackRef iter; - _PyStackRef next; // _ITER_CHECK_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -6105,6 +6108,8 @@ } // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -6123,6 +6128,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -6130,18 +6138,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_CHECK_TUPLE____GUARD_NOT_EXHAUSTED_TUPLE____ITER_NEXT_TUPLE: { - _PyStackRef iter; - _PyStackRef next; // _ITER_CHECK_TUPLE { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyTupleIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -6150,6 +6157,8 @@ } // _GUARD_NOT_EXHAUSTED_TUPLE { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyTupleIter_Type); @@ -6165,6 +6174,9 @@ } // _ITER_NEXT_TUPLE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyTupleIter_Type); @@ -6172,10 +6184,10 @@ assert(seq); assert(it->it_index < PyTuple_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } @@ -6219,22 +6231,21 @@ } case _LOAD_SMALL_INT_1____GUARD_NOS_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef unused; // _LOAD_SMALL_INT_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(0)); assert(oparg < _PY_NSMALLPOSINTS); PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg]; value = PyStackRef_FromPyObjectImmortal(obj); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_NOS_INT { + _PyStackRef left; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!PyLong_CheckExact(left_o)) { @@ -6246,11 +6257,9 @@ } case _CHECK_MANAGED_OBJECT_HAS_VALUES____LOAD_ATTR_INSTANCE_VALUE_0: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef null = PyStackRef_NULL; // _CHECK_MANAGED_OBJECT_HAS_VALUES { + _PyStackRef owner; owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); @@ -6262,6 +6271,11 @@ } // _LOAD_ATTR_INSTANCE_VALUE_0 { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef null = PyStackRef_NULL; + (void)null; + owner = stack_pointer[-1]; uint16_t offset = (uint16_t)CURRENT_OPERAND0(1); PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset); @@ -6275,17 +6289,15 @@ null = PyStackRef_NULL; attr = PyStackRef_FromPyObjectSteal(attr_o); PyStackRef_CLOSE(owner); + stack_pointer[-1] = attr; } - stack_pointer[-1] = attr; break; } case _CHECK_MANAGED_OBJECT_HAS_VALUES____LOAD_ATTR_INSTANCE_VALUE_1: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef null = PyStackRef_NULL; // _CHECK_MANAGED_OBJECT_HAS_VALUES { + _PyStackRef owner; owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); @@ -6297,6 +6309,11 @@ } // _LOAD_ATTR_INSTANCE_VALUE_1 { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef null = PyStackRef_NULL; + (void)null; + owner = stack_pointer[-1]; uint16_t offset = (uint16_t)CURRENT_OPERAND0(1); PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset); @@ -6310,16 +6327,15 @@ null = PyStackRef_NULL; attr = PyStackRef_FromPyObjectSteal(attr_o); PyStackRef_CLOSE(owner); + stack_pointer[-1] = attr; + stack_pointer[0] = null; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = null; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____ITER_CHECK_LIST: { - _PyStackRef iter; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6329,6 +6345,7 @@ } // _ITER_CHECK_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -6339,9 +6356,9 @@ } case _ITER_CHECK_LIST____GUARD_NOT_EXHAUSTED_LIST: { - _PyStackRef iter; // _ITER_CHECK_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -6350,6 +6367,8 @@ } // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -6370,17 +6389,17 @@ } case _LOAD_FAST_4____SET_IP: { - _PyStackRef value; // _LOAD_FAST_4 { + _PyStackRef value; oparg = 4; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -6390,7 +6409,6 @@ } case _CHECK_VALIDITY____GUARD_IS_FALSE_POP: { - _PyStackRef flag; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6400,6 +6418,7 @@ } // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -6413,8 +6432,6 @@ } case _CHECK_FUNCTION____LOAD_CONST_INLINE_WITH_NULL: { - _PyStackRef value; - _PyStackRef null; // _CHECK_FUNCTION { uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -6427,28 +6444,30 @@ } // _LOAD_CONST_INLINE_WITH_NULL { + _PyStackRef value; + _PyStackRef null; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectNew(ptr); null = PyStackRef_NULL; + stack_pointer[0] = value; + stack_pointer[1] = null; + stack_pointer += 2; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer[1] = null; - stack_pointer += 2; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -6458,11 +6477,9 @@ } case _GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -6474,7 +6491,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -6483,18 +6504,15 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____BINARY_SUBSCR: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -6502,6 +6520,9 @@ } // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -6513,10 +6534,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } @@ -6545,10 +6566,9 @@ } case _GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST: { - _PyStackRef iter; - _PyStackRef next; // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -6568,6 +6588,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -6575,41 +6598,41 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_CONST_INLINE_WITH_NULL____LOAD_FAST_5: { - _PyStackRef value; - _PyStackRef null; // _LOAD_CONST_INLINE_WITH_NULL { + _PyStackRef value; + _PyStackRef null; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectNew(ptr); null = PyStackRef_NULL; + stack_pointer[0] = value; + stack_pointer[1] = null; + stack_pointer += 2; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer[1] = null; - stack_pointer += 2; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_5 { + _PyStackRef value; oparg = 5; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SAVE_RETURN_OFFSET____PUSH_FRAME: { - _PyInterpreterFrame *new_frame; // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(0); @@ -6622,6 +6645,7 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -6642,7 +6666,6 @@ } case _CHECK_VALIDITY____LOAD_SMALL_INT_1: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6652,20 +6675,20 @@ } // _LOAD_SMALL_INT_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(oparg < _PY_NSMALLPOSINTS); PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg]; value = PyStackRef_FromPyObjectImmortal(obj); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6675,23 +6698,23 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _COMPARE_OP_INT____GUARD_IS_TRUE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef flag; // _COMPARE_OP_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -6716,13 +6739,14 @@ PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);(void)right; res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_IS_TRUE_POP { - flag = res; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -6735,11 +6759,11 @@ } case _CONTAINS_OP_SET____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _CONTAINS_OP_SET { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -6758,10 +6782,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(0); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6773,12 +6797,9 @@ } case _GUARD_NOS_INT____BINARY_OP_ADD_INT: { - _PyStackRef left; - _PyStackRef unused; - _PyStackRef right; - _PyStackRef res; // _GUARD_NOS_INT { + _PyStackRef left; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!PyLong_CheckExact(left_o)) { @@ -6788,7 +6809,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -6797,17 +6822,14 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CONTAINS_OP_SET: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -6815,6 +6837,9 @@ } // _CONTAINS_OP_SET { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -6833,17 +6858,17 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(1); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_TYPE_VERSION____CHECK_MANAGED_OBJECT_HAS_VALUES: { - _PyStackRef owner; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -6855,6 +6880,8 @@ } // _CHECK_MANAGED_OBJECT_HAS_VALUES { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -6867,17 +6894,17 @@ } case _LOAD_FAST_1____SET_IP: { - _PyStackRef value; // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -6887,15 +6914,15 @@ } case _LOAD_CONST_INLINE____SET_IP: { - _PyStackRef value; // _LOAD_CONST_INLINE { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectNew(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -6905,11 +6932,11 @@ } case _BINARY_SUBSCR____CHECK_VALIDITY: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -6921,10 +6948,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -6936,34 +6963,32 @@ } case _LOAD_FAST_5____LOAD_FAST_4: { - _PyStackRef value; // _LOAD_FAST_5 { + _PyStackRef value; oparg = 5; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_4 { + _PyStackRef value; oparg = 4; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CHECK_FUNCTION_VERSION: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -6971,6 +6996,7 @@ } // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(1); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(1); @@ -6989,11 +7015,9 @@ } case _CHECK_FUNCTION_VERSION____CHECK_FUNCTION_EXACT_ARGS: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -7010,8 +7034,11 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); assert(PyFunction_Check(callable_o)); PyFunctionObject *func = (PyFunctionObject *)callable_o; @@ -7025,8 +7052,6 @@ } case _CHECK_VALIDITY_AND_SET_IP____FOR_ITER_TIER_TWO: { - _PyStackRef iter; - _PyStackRef next; // _CHECK_VALIDITY_AND_SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -7038,6 +7063,8 @@ } // _FOR_ITER_TIER_TWO { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; /* before: [iter]; after: [iter, iter()] *or* [] (and jump over END_FOR.) */ PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); @@ -7066,20 +7093,19 @@ } next = PyStackRef_FromPyObjectSteal(next_o); // Common case: no jump, leave it to the code generator + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _COMPARE_OP_STR____GUARD_IS_FALSE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef flag; // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -7095,13 +7121,14 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_IS_FALSE_POP { - flag = res; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -7114,33 +7141,33 @@ } case _LOAD_FAST_7____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST_7: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -7152,19 +7179,19 @@ } // _LOAD_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____STORE_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -7174,45 +7201,44 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_NOS_INT____BINARY_OP_SUBTRACT_INT: { - _PyStackRef left; - _PyStackRef unused; - _PyStackRef right; - _PyStackRef res; // _GUARD_NOS_INT { + _PyStackRef left; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!PyLong_CheckExact(left_o)) { @@ -7222,7 +7248,11 @@ } // _BINARY_OP_SUBTRACT_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -7231,17 +7261,17 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION: { - _PyStackRef owner; // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -7252,6 +7282,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -7264,12 +7296,12 @@ } case _CALL_LEN____CHECK_VALIDITY: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _CALL_LEN { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -7307,10 +7339,10 @@ PyStackRef_CLOSE(callable[0]); PyStackRef_CLOSE(arg_stackref); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -7322,7 +7354,6 @@ } case _CHECK_VALIDITY____LOAD_FAST_0: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -7332,14 +7363,15 @@ } // _LOAD_FAST_0 { + _PyStackRef value; oparg = 0; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } @@ -7372,10 +7404,6 @@ } case _SET_IP____CALL_LEN: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -7383,6 +7411,10 @@ } // _CALL_LEN { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -7420,19 +7452,17 @@ PyStackRef_CLOSE(callable[0]); PyStackRef_CLOSE(arg_stackref); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_KEYS_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -7444,7 +7474,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); /* Cached method object */ @@ -7453,24 +7487,24 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -7480,24 +7514,24 @@ } case _LOAD_SMALL_INT_1____BINARY_OP_ADD_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_SMALL_INT_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(0)); assert(oparg < _PY_NSMALLPOSINTS); PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg]; value = PyStackRef_FromPyObjectImmortal(obj); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_OP_ADD_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -7507,50 +7541,51 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____GUARD_TYPE_VERSION: { - _PyStackRef value; - _PyStackRef owner; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -7563,17 +7598,17 @@ } case _LOAD_FAST_5____SET_IP: { - _PyStackRef value; // _LOAD_FAST_5 { + _PyStackRef value; oparg = 5; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -7583,17 +7618,17 @@ } case _LOAD_FAST_3____SET_IP: { - _PyStackRef value; // _LOAD_FAST_3 { + _PyStackRef value; oparg = 3; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -7603,10 +7638,9 @@ } case _TO_BOOL_BOOL____GUARD_IS_FALSE_POP: { - _PyStackRef value; - _PyStackRef flag; // _TO_BOOL_BOOL { + _PyStackRef value; value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UOP_STAT_INC(uopcode, miss); @@ -7616,7 +7650,8 @@ } // _GUARD_IS_FALSE_POP { - flag = value; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -7629,9 +7664,9 @@ } case _PUSH_FRAME____RESUME_CHECK: { - _PyInterpreterFrame *new_frame; // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -7676,37 +7711,35 @@ } case _LOAD_FAST_0____LOAD_FAST_1: { - _PyStackRef value; // _LOAD_FAST_0 { + _PyStackRef value; oparg = 0; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_NOS_INT____COMPARE_OP_INT: { - _PyStackRef left; - _PyStackRef unused; - _PyStackRef right; - _PyStackRef res; // _GUARD_NOS_INT { + _PyStackRef left; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!PyLong_CheckExact(left_o)) { @@ -7716,8 +7749,12 @@ } // _COMPARE_OP_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!_PyLong_IsCompact((PyLongObject *)left_o)) { @@ -7739,25 +7776,25 @@ PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);(void)right; res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_4____CHECK_FUNCTION: { - _PyStackRef value; // _LOAD_FAST_4 { + _PyStackRef value; oparg = 4; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_FUNCTION { uint32_t func_version = (uint32_t)CURRENT_OPERAND0(1); @@ -7772,10 +7809,10 @@ } case _FOR_ITER_TIER_TWO____CHECK_VALIDITY: { - _PyStackRef iter; - _PyStackRef next; // _FOR_ITER_TIER_TWO { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; /* before: [iter]; after: [iter, iter()] *or* [] (and jump over END_FOR.) */ PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); @@ -7804,10 +7841,10 @@ } next = PyStackRef_FromPyObjectSteal(next_o); // Common case: no jump, leave it to the code generator + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -7819,23 +7856,23 @@ } case _LOAD_FAST_1____BINARY_SUBSCR_STR_INT: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -7867,17 +7904,17 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: { - _PyStackRef owner; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -7889,6 +7926,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -7900,64 +7939,65 @@ } case _LOAD_FAST_1____LOAD_SMALL_INT_1: { - _PyStackRef value; // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_SMALL_INT_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(oparg < _PY_NSMALLPOSINTS); PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg]; value = PyStackRef_FromPyObjectImmortal(obj); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_4____LOAD_SMALL_INT_1: { - _PyStackRef value; // _LOAD_FAST_4 { + _PyStackRef value; oparg = 4; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_SMALL_INT_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(oparg < _PY_NSMALLPOSINTS); PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg]; value = PyStackRef_FromPyObjectImmortal(obj); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_OP_ADD_INT____STORE_FAST_1: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -7968,24 +8008,24 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _MAKE_WARM____POP_TOP: { - _PyStackRef value; // _MAKE_WARM { current_executor->vm_data.warm = true; @@ -7996,21 +8036,22 @@ } // _POP_TOP { + _PyStackRef value; value = stack_pointer[-1]; PyStackRef_CLOSE(value); + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CALL_BUILTIN_FAST____CHECK_PERIODIC: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -8057,10 +8098,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_PERIODIC { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); @@ -8076,7 +8117,6 @@ } case _CHECK_VALIDITY____TO_BOOL_BOOL: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -8086,6 +8126,7 @@ } // _TO_BOOL_BOOL { + _PyStackRef value; value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UOP_STAT_INC(uopcode, miss); @@ -8097,19 +8138,18 @@ } case _COPY____SET_IP: { - _PyStackRef bottom; - _PyStackRef *unused; - _PyStackRef top; // _COPY { + _PyStackRef bottom; + _PyStackRef top; oparg = CURRENT_OPARG(0); bottom = stack_pointer[-1 - (oparg-1)]; assert(oparg > 0); top = PyStackRef_DUP(bottom); + stack_pointer[0] = top; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = top; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -8119,70 +8159,68 @@ } case _SWAP____SWAP: { - _PyStackRef bottom_in; - _PyStackRef *unused; - _PyStackRef top_in; - _PyStackRef top_out; - _PyStackRef bottom_out; // _SWAP { + _PyStackRef top_in; + _PyStackRef bottom_in; + _PyStackRef top_out; + _PyStackRef bottom_out; oparg = CURRENT_OPARG(0); top_in = stack_pointer[-1]; bottom_in = stack_pointer[-2 - (oparg-2)]; bottom_out = bottom_in;(void)bottom_in; top_out = top_in;(void)top_in; assert(oparg >= 2); + stack_pointer[-2 - (oparg-2)] = top_out; + stack_pointer[-1] = bottom_out; } - stack_pointer[-2 - (oparg-2)] = top_out; - stack_pointer[-1] = bottom_out; // _SWAP { + _PyStackRef top_in; + _PyStackRef bottom_in; + _PyStackRef top_out; + _PyStackRef bottom_out; oparg = CURRENT_OPARG(1); - top_in = bottom_out; - bottom_in = top_out; + top_in = stack_pointer[-1]; + bottom_in = stack_pointer[-2 - (oparg-2)]; bottom_out = bottom_in;(void)bottom_in; top_out = top_in;(void)top_in; assert(oparg >= 2); + stack_pointer[-2 - (oparg-2)] = top_out; + stack_pointer[-1] = bottom_out; } - stack_pointer[-2 - (oparg-2)] = top_out; - stack_pointer[-1] = bottom_out; break; } case _COPY____COPY: { - _PyStackRef bottom; - _PyStackRef *unused; - _PyStackRef top; // _COPY { + _PyStackRef bottom; + _PyStackRef top; oparg = CURRENT_OPARG(0); bottom = stack_pointer[-1 - (oparg-1)]; assert(oparg > 0); top = PyStackRef_DUP(bottom); + stack_pointer[0] = top; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = top; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _COPY { + _PyStackRef bottom; + _PyStackRef top; oparg = CURRENT_OPARG(1); - stack_pointer += -(oparg-1); - assert(WITHIN_STACK_BOUNDS()); bottom = stack_pointer[-1 - (oparg-1)]; assert(oparg > 0); top = PyStackRef_DUP(bottom); + stack_pointer[0] = top; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = top; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CALL_BUILTIN_FAST: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -8190,6 +8228,10 @@ } // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -8236,18 +8278,17 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST_1: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -8259,57 +8300,59 @@ } // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST_7____LOAD_FAST_7: { - _PyStackRef value; // _STORE_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(0)); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_0____CHECK_MANAGED_OBJECT_HAS_VALUES: { - _PyStackRef value; - _PyStackRef owner; // _LOAD_FAST_0 { + _PyStackRef value; oparg = 0; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_MANAGED_OBJECT_HAS_VALUES { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -8322,9 +8365,6 @@ } case _SET_IP____BINARY_SUBSCR_DICT: { - _PyStackRef dict_st; - _PyStackRef sub_st; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -8332,6 +8372,9 @@ } // _BINARY_SUBSCR_DICT { + _PyStackRef sub_st; + _PyStackRef dict_st; + _PyStackRef res; sub_st = stack_pointer[-1]; dict_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -8355,38 +8398,38 @@ if (rc <= 0) JUMP_TO_ERROR(1); // not found or error res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_5____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_FAST_5 { + _PyStackRef value; oparg = 5; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____LOAD_DEREF: { - _PyStackRef value; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -8394,6 +8437,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(1); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -8404,16 +8448,14 @@ if (true) JUMP_TO_ERROR(1); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_FUNCTION____LOAD_CONST_INLINE_BORROW_WITH_NULL: { - _PyStackRef value; - _PyStackRef null; // _CHECK_FUNCTION { uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -8426,43 +8468,43 @@ } // _LOAD_CONST_INLINE_BORROW_WITH_NULL { + _PyStackRef value; + _PyStackRef null; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); null = PyStackRef_NULL; + stack_pointer[0] = value; + stack_pointer[1] = null; + stack_pointer += 2; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer[1] = null; - stack_pointer += 2; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_CONST_INLINE: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectNew(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____CALL_LIST_APPEND: { - _PyStackRef callable; - _PyStackRef self; - _PyStackRef arg; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -8472,6 +8514,9 @@ } // _CALL_LIST_APPEND { + _PyStackRef arg; + _PyStackRef self; + _PyStackRef callable; oparg = CURRENT_OPARG(1); arg = stack_pointer[-1]; self = stack_pointer[-2]; @@ -8505,16 +8550,16 @@ assert(next_instr->op.code == POP_TOP); SKIP_OVER(1); #endif + stack_pointer += -3; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -3; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_DEREF____CHECK_VALIDITY: { - _PyStackRef value; // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(0); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -8525,10 +8570,10 @@ if (true) JUMP_TO_ERROR(0); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -8540,11 +8585,11 @@ } case _BINARY_OP_ADD_INT____SET_IP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -8555,10 +8600,10 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -8568,11 +8613,10 @@ } case _GUARD_BOTH_UNICODE____COMPARE_OP_STR: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_UNICODE { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -8588,7 +8632,12 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(COMPARE_OP, hit); @@ -8601,25 +8650,25 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_2____SET_IP: { - _PyStackRef value; // _LOAD_FAST_2 { + _PyStackRef value; oparg = 2; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -8629,20 +8678,20 @@ } case _LOAD_CONST_INLINE_BORROW____GUARD_BOTH_UNICODE: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_UNICODE { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -8659,7 +8708,6 @@ } case _CHECK_VALIDITY____GUARD_IS_TRUE_POP: { - _PyStackRef flag; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -8669,6 +8717,7 @@ } // _GUARD_IS_TRUE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; @@ -8682,12 +8731,11 @@ } case _LOAD_ATTR_METHOD_NO_DICT____LOAD_FAST_5: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; - _PyStackRef value; // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -8698,31 +8746,31 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_5 { + _PyStackRef value; oparg = 5; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_SUBSCR_STR_INT____STORE_FAST_7: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -8755,52 +8803,53 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(1)); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST_7____LOAD_FAST_3: { - _PyStackRef value; // _LOAD_FAST_7 { + _PyStackRef value; oparg = 7; assert(oparg == CURRENT_OPARG(0)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST_3 { + _PyStackRef value; oparg = 3; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _TO_BOOL_BOOL____GUARD_IS_TRUE_POP: { - _PyStackRef value; - _PyStackRef flag; // _TO_BOOL_BOOL { + _PyStackRef value; value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UOP_STAT_INC(uopcode, miss); @@ -8810,7 +8859,8 @@ } // _GUARD_IS_TRUE_POP { - flag = value; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -8823,12 +8873,11 @@ } case _BINARY_OP_SUBTRACT_INT____GUARD_NOS_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef unused; // _BINARY_OP_SUBTRACT_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -8839,12 +8888,13 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_NOS_INT { + _PyStackRef left; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!PyLong_CheckExact(left_o)) { @@ -8856,22 +8906,22 @@ } case _LOAD_CONST_INLINE_BORROW____COMPARE_OP_STR: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); - right = value; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -8885,15 +8935,14 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _RESUME_CHECK____LOAD_FAST_0: { - _PyStackRef value; // _RESUME_CHECK { #if defined(__EMSCRIPTEN__) @@ -8920,23 +8969,24 @@ } // _LOAD_FAST_0 { + _PyStackRef value; oparg = 0; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_OP____CHECK_VALIDITY: { - _PyStackRef lhs; - _PyStackRef rhs; - _PyStackRef res; // _BINARY_OP { + _PyStackRef rhs; + _PyStackRef lhs; + _PyStackRef res; oparg = CURRENT_OPARG(0); rhs = stack_pointer[-1]; lhs = stack_pointer[-2]; @@ -8950,10 +9000,10 @@ PyStackRef_CLOSE(rhs); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -8965,12 +9015,12 @@ } case _CALL_BUILTIN_O____CHECK_PERIODIC: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _CALL_BUILTIN_O { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -9013,10 +9063,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_PERIODIC { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); @@ -9032,7 +9082,6 @@ } case _CHECK_VALIDITY____LOAD_FAST_1: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -9042,28 +9091,23 @@ } // _LOAD_FAST_1 { + _PyStackRef value; oparg = 1; assert(oparg == CURRENT_OPARG(1)); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_CALL_BOUND_METHOD_EXACT_ARGS____INIT_CALL_BOUND_METHOD_EXACT_ARGS____CHECK_FUNCTION_VERSION____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *null; - _PyStackRef *unused; - _PyStackRef *func; - _PyStackRef *self; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_CALL_BOUND_METHOD_EXACT_ARGS { + _PyStackRef *null; + _PyStackRef *callable; oparg = CURRENT_OPARG(0); null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -9078,7 +9122,13 @@ } // _INIT_CALL_BOUND_METHOD_EXACT_ARGS { + _PyStackRef *null; + _PyStackRef *callable; + _PyStackRef *func; + _PyStackRef *self; oparg = CURRENT_OPARG(1); + null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; func = &stack_pointer[-2 - oparg]; self = &stack_pointer[-1 - oparg]; (void)null; @@ -9091,6 +9141,7 @@ } // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(2); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(2); @@ -9107,8 +9158,11 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(3); self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); assert(PyFunction_Check(callable_o)); PyFunctionObject *func = (PyFunctionObject *)callable_o; @@ -9120,7 +9174,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(4); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -9135,8 +9191,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(5); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9145,10 +9207,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(6); @@ -9163,16 +9225,10 @@ } case _CHECK_CALL_BOUND_METHOD_EXACT_ARGS____INIT_CALL_BOUND_METHOD_EXACT_ARGS____CHECK_FUNCTION_VERSION_INLINE____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *null; - _PyStackRef *unused; - _PyStackRef *func; - _PyStackRef *self; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_CALL_BOUND_METHOD_EXACT_ARGS { + _PyStackRef *null; + _PyStackRef *callable; oparg = CURRENT_OPARG(0); null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -9187,7 +9243,13 @@ } // _INIT_CALL_BOUND_METHOD_EXACT_ARGS { + _PyStackRef *null; + _PyStackRef *callable; + _PyStackRef *func; + _PyStackRef *self; oparg = CURRENT_OPARG(1); + null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; func = &stack_pointer[-2 - oparg]; self = &stack_pointer[-1 - oparg]; (void)null; @@ -9211,6 +9273,8 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(3); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -9225,7 +9289,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(4); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -9240,8 +9306,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(5); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9250,10 +9322,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(6); @@ -9268,12 +9340,12 @@ } case _INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET____PUSH_FRAME: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -9286,10 +9358,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(1); @@ -9302,6 +9374,8 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; + new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. assert(tstate->interp->eval_frame == NULL); @@ -9321,11 +9395,6 @@ } case _CHECK_FUNCTION_VERSION_INLINE____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_VERSION_INLINE { uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -9339,6 +9408,8 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -9353,7 +9424,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(2); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -9368,8 +9441,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(3); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9378,10 +9457,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(4); @@ -9396,13 +9475,9 @@ } case _CHECK_FUNCTION_VERSION____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -9419,8 +9494,11 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); assert(PyFunction_Check(callable_o)); PyFunctionObject *func = (PyFunctionObject *)callable_o; @@ -9432,7 +9510,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(2); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -9447,8 +9527,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(3); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9457,10 +9543,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(4); @@ -9475,13 +9561,9 @@ } case _CHECK_FUNCTION_VERSION____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -9498,7 +9580,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(1); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -9513,9 +9597,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(2); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9524,10 +9613,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(3); @@ -9542,10 +9631,6 @@ } case _CHECK_FUNCTION_VERSION_INLINE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_VERSION_INLINE { uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -9559,6 +9644,10 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -9571,10 +9660,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(2); @@ -9589,13 +9678,9 @@ } case _CHECK_FUNCTION_VERSION____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_VERSION { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; uint32_t func_version = (uint32_t)CURRENT_OPERAND0(0); @@ -9612,9 +9697,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -9623,10 +9713,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(2); @@ -9641,32 +9731,32 @@ } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -9678,19 +9768,18 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_BOTH_INT: { - _PyStackRef left; - _PyStackRef right; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -9698,6 +9787,8 @@ } // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -9715,11 +9806,10 @@ } case _GUARD_BOTH_INT____BINARY_OP_ADD_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -9735,6 +9825,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -9743,19 +9838,19 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _COMPARE_OP_STR____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -9771,10 +9866,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -9786,9 +9881,6 @@ } case _SET_IP____COMPARE_OP_STR: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -9796,6 +9888,9 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -9811,19 +9906,19 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CONTAINS_OP____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -9836,10 +9931,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(0); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -9851,9 +9946,6 @@ } case _SET_IP____CONTAINS_OP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -9861,6 +9953,9 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -9873,15 +9968,14 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(1); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_TYPE_VERSION: { - _PyStackRef owner; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -9889,6 +9983,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -9918,12 +10013,11 @@ } case _BINARY_OP_ADD_INT____STORE_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -9934,38 +10028,39 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____BINARY_SUBSCR_STR_INT: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -9997,42 +10092,42 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _STORE_FAST____STORE_FAST: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(0); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -10047,7 +10142,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(1); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -10064,13 +10161,9 @@ } case _CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -10087,9 +10180,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -10098,20 +10196,20 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -10124,10 +10222,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(1); @@ -10142,21 +10240,21 @@ } case _LOAD_FAST____GUARD_BOTH_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -10173,12 +10271,11 @@ } case _BINARY_SUBSCR_STR_INT____STORE_FAST: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -10211,27 +10308,27 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_FLOAT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -10247,6 +10344,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -10256,17 +10358,17 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _PUSH_FRAME____CHECK_VALIDITY: { - _PyInterpreterFrame *new_frame; // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -10329,9 +10431,9 @@ } case _ITER_CHECK_RANGE____GUARD_NOT_EXHAUSTED_RANGE: { - _PyStackRef iter; // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -10341,6 +10443,8 @@ } // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); if (r->len <= 0) { @@ -10352,7 +10456,6 @@ } case _SET_IP____ITER_CHECK_RANGE: { - _PyStackRef iter; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -10360,6 +10463,7 @@ } // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -10371,10 +10475,9 @@ } case _GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE: { - _PyStackRef iter; - _PyStackRef next; // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -10385,6 +10488,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -10394,18 +10500,18 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(1); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_NEXT_RANGE____CHECK_VALIDITY: { - _PyStackRef iter; - _PyStackRef next; // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -10416,10 +10522,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(0); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -10431,9 +10537,6 @@ } case _SET_IP____CHECK_FUNCTION_EXACT_ARGS: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -10441,6 +10544,8 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -10457,11 +10562,10 @@ } case _ITER_NEXT_LIST____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -10470,25 +10574,23 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____BINARY_OP: { - _PyStackRef lhs; - _PyStackRef rhs; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -10496,6 +10598,9 @@ } // _BINARY_OP { + _PyStackRef rhs; + _PyStackRef lhs; + _PyStackRef res; oparg = CURRENT_OPARG(1); rhs = stack_pointer[-1]; lhs = stack_pointer[-2]; @@ -10509,19 +10614,19 @@ PyStackRef_CLOSE(rhs); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -10532,11 +10637,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -10550,7 +10655,6 @@ /* _LOAD_ATTR_SLOT is split on (oparg & 1) */ case _RESUME_CHECK____LOAD_FAST: { - _PyStackRef value; // _RESUME_CHECK { #if defined(__EMSCRIPTEN__) @@ -10577,21 +10681,21 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_TRUE_POP____LOAD_FAST: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_TRUE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; @@ -10603,23 +10707,23 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST: { - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(0); seq = stack_pointer[-1]; assert(oparg == 2); @@ -10636,70 +10740,68 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____PUSH_NULL: { - _PyStackRef value; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _PUSH_NULL { + _PyStackRef res; res = PyStackRef_NULL; + stack_pointer[0] = res; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = res; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _PUSH_NULL____LOAD_FAST: { - _PyStackRef res; - _PyStackRef value; // _PUSH_NULL { + _PyStackRef res; res = PyStackRef_NULL; + stack_pointer[0] = res; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = res; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____COMPARE_OP_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -10707,6 +10809,9 @@ } // _COMPARE_OP_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -10731,19 +10836,18 @@ PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);(void)right; res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_BOTH_FLOAT____BINARY_OP_ADD_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_FLOAT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -10759,6 +10863,11 @@ } // _BINARY_OP_ADD_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -10768,21 +10877,21 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _BINARY_OP_MULTIPLY_FLOAT____GUARD_BOTH_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -10794,13 +10903,15 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -10817,9 +10928,9 @@ } case _ITER_CHECK_TUPLE____GUARD_NOT_EXHAUSTED_TUPLE: { - _PyStackRef iter; // _ITER_CHECK_TUPLE { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyTupleIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -10828,6 +10939,8 @@ } // _GUARD_NOT_EXHAUSTED_TUPLE { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyTupleIter_Type); @@ -10845,11 +10958,11 @@ } case _COMPARE_OP_INT____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _COMPARE_OP_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -10874,10 +10987,10 @@ PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);(void)right; res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -10889,7 +11002,6 @@ } case _CHECK_VALIDITY____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -10899,27 +11011,28 @@ } // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _STORE_FAST____SET_IP: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -10929,12 +11042,12 @@ } case _CALL_BUILTIN_FAST____CHECK_VALIDITY: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -10981,10 +11094,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -10996,32 +11109,32 @@ } case _LOAD_CONST_INLINE_BORROW____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_BOTH_INT____BINARY_OP_SUBTRACT_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -11037,6 +11150,11 @@ } // _BINARY_OP_SUBTRACT_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -11045,32 +11163,31 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_SLOT is split on (oparg & 1) */ case _SWAP____SET_IP: { - _PyStackRef bottom_in; - _PyStackRef *unused; - _PyStackRef top_in; - _PyStackRef top_out; - _PyStackRef bottom_out; // _SWAP { + _PyStackRef top_in; + _PyStackRef bottom_in; + _PyStackRef top_out; + _PyStackRef bottom_out; oparg = CURRENT_OPARG(0); top_in = stack_pointer[-1]; bottom_in = stack_pointer[-2 - (oparg-2)]; bottom_out = bottom_in;(void)bottom_in; top_out = top_in;(void)top_in; assert(oparg >= 2); + stack_pointer[-2 - (oparg-2)] = top_out; + stack_pointer[-1] = bottom_out; } - stack_pointer[-2 - (oparg-2)] = top_out; - stack_pointer[-1] = bottom_out; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11080,31 +11197,29 @@ } case _LOAD_CONST_INLINE_BORROW____LOAD_FAST: { - _PyStackRef value; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____LOAD_ATTR: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self_or_null = PyStackRef_NULL; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11112,6 +11227,9 @@ } // _LOAD_ATTR { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self_or_null = PyStackRef_NULL; oparg = CURRENT_OPARG(1); owner = stack_pointer[-1]; PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1); @@ -11153,17 +11271,15 @@ self_or_null = PyStackRef_NULL; } attr = PyStackRef_FromPyObjectSteal(attr_o); + stack_pointer[-1] = attr; + if (oparg & 1) stack_pointer[0] = self_or_null; + stack_pointer += (oparg & 1); + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - if (oparg & 1) stack_pointer[0] = self_or_null; - stack_pointer += (oparg & 1); - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____FOR_ITER_TIER_TWO: { - _PyStackRef iter; - _PyStackRef next; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11171,6 +11287,8 @@ } // _FOR_ITER_TIER_TWO { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; /* before: [iter]; after: [iter, iter()] *or* [] (and jump over END_FOR.) */ PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); @@ -11199,21 +11317,18 @@ } next = PyStackRef_FromPyObjectSteal(next_o); // Common case: no jump, leave it to the code generator + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -11222,14 +11337,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(1); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -11244,18 +11362,15 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____STORE_SUBSCR_LIST_INT: { - _PyStackRef value; - _PyStackRef list_st; - _PyStackRef sub_st; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11263,6 +11378,9 @@ } // _STORE_SUBSCR_LIST_INT { + _PyStackRef sub_st; + _PyStackRef list_st; + _PyStackRef value; sub_st = stack_pointer[-1]; list_st = stack_pointer[-2]; value = stack_pointer[-3]; @@ -11302,18 +11420,18 @@ Py_DECREF(old_value); PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(list_st); + stack_pointer += -3; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -3; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_SUBSCR_LIST_INT____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef list_st; - _PyStackRef sub_st; // _STORE_SUBSCR_LIST_INT { + _PyStackRef sub_st; + _PyStackRef list_st; + _PyStackRef value; sub_st = stack_pointer[-1]; list_st = stack_pointer[-2]; value = stack_pointer[-3]; @@ -11353,9 +11471,9 @@ Py_DECREF(old_value); PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(list_st); + stack_pointer += -3; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -3; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11367,11 +11485,11 @@ } case _LOAD_ATTR_METHOD_NO_DICT____SET_IP: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -11382,11 +11500,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11396,12 +11514,12 @@ } case _CALL_BUILTIN_O____CHECK_VALIDITY: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _CALL_BUILTIN_O { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -11444,10 +11562,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11459,11 +11577,11 @@ } case _LOAD_ATTR_METHOD_NO_DICT____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -11474,11 +11592,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11490,12 +11608,11 @@ } case _BINARY_SUBSCR_STR_INT____LOAD_FAST: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -11528,41 +11645,43 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -11572,8 +11691,6 @@ } case _CHECK_VALIDITY____GUARD_IS_FALSE_POP____LOAD_FAST: { - _PyStackRef flag; - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11583,6 +11700,7 @@ } // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -11594,36 +11712,38 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -11633,9 +11753,6 @@ } case _SET_IP____GUARD_BOTH_INT____BINARY_OP_ADD_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11643,6 +11760,8 @@ } // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -11658,6 +11777,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -11666,25 +11790,23 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_CONST_INLINE_BORROW____SET_IP____GUARD_BOTH_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11692,7 +11814,9 @@ } // _GUARD_BOTH_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -11709,10 +11833,9 @@ } case _GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -11724,28 +11847,27 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____COMPARE_OP_STR____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11753,6 +11875,9 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -11768,10 +11893,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11783,18 +11908,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____COMPARE_OP_STR: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11802,8 +11924,11 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(2); - right = value; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -11817,20 +11942,19 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _COMPARE_OP_STR____CHECK_VALIDITY____GUARD_IS_FALSE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef flag; // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -11846,10 +11970,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11859,7 +11983,8 @@ } // _GUARD_IS_FALSE_POP { - flag = res; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -11872,9 +11997,6 @@ } case _SET_IP____CONTAINS_OP____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -11882,6 +12004,9 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -11894,10 +12019,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(1); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -11909,19 +12034,16 @@ } case _LOAD_FAST____SET_IP____CONTAINS_OP: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11929,8 +12051,11 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(2); - right = value; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -11941,56 +12066,57 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(2); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____GUARD_TYPE_VERSION: { - _PyStackRef value; - _PyStackRef owner; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -11998,7 +12124,8 @@ } // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -12011,12 +12138,11 @@ } case _CONTAINS_OP____CHECK_VALIDITY____GUARD_IS_FALSE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; - _PyStackRef flag; // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -12029,10 +12155,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(0); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12042,7 +12168,8 @@ } // _GUARD_IS_FALSE_POP { - flag = b; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -12055,12 +12182,10 @@ } case _GUARD_BOTH_INT____BINARY_OP_ADD_INT____STORE_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -12076,6 +12201,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -12084,48 +12214,50 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____BINARY_SUBSCR_STR_INT: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; - str_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; + str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); if (!PyLong_CheckExact(sub)) { @@ -12156,60 +12288,62 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _STORE_FAST____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____GUARD_TYPE_VERSION____CHECK_MANAGED_OBJECT_HAS_VALUES: { - _PyStackRef value; - _PyStackRef owner; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -12220,6 +12354,8 @@ } // _CHECK_MANAGED_OBJECT_HAS_VALUES { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -12232,7 +12368,6 @@ } case _CHECK_VALIDITY____STORE_FAST____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12242,61 +12377,64 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_FAST: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -12308,33 +12446,32 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(0); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -12349,7 +12486,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(1); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -12364,8 +12503,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(2); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -12374,21 +12519,17 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -12405,9 +12546,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -12416,10 +12562,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(2); @@ -12434,12 +12580,11 @@ } case _BINARY_SUBSCR_STR_INT____STORE_FAST____LOAD_FAST: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -12472,47 +12617,49 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____BINARY_SUBSCR_STR_INT____STORE_FAST: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -12544,23 +12691,23 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SAVE_RETURN_OFFSET____PUSH_FRAME____CHECK_VALIDITY: { - _PyInterpreterFrame *new_frame; // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(0); @@ -12573,6 +12720,7 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -12600,9 +12748,9 @@ } case _PUSH_FRAME____CHECK_VALIDITY____RESUME_CHECK: { - _PyInterpreterFrame *new_frame; // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -12654,9 +12802,9 @@ } case _GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION: { - _PyStackRef owner; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -12668,6 +12816,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -12677,6 +12827,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -12689,7 +12841,6 @@ } case _SET_IP____ITER_CHECK_RANGE____GUARD_NOT_EXHAUSTED_RANGE: { - _PyStackRef iter; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -12697,6 +12848,7 @@ } // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -12706,6 +12858,8 @@ } // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); if (r->len <= 0) { @@ -12717,9 +12871,6 @@ } case _SET_IP____BINARY_SUBSCR____CHECK_VALIDITY: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -12727,6 +12878,9 @@ } // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -12738,10 +12892,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12753,11 +12907,10 @@ } case _ITER_NEXT_RANGE____CHECK_VALIDITY____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -12768,10 +12921,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(0); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12781,20 +12934,20 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE____CHECK_VALIDITY: { - _PyStackRef iter; - _PyStackRef next; // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -12805,6 +12958,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -12814,10 +12970,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(1); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12829,7 +12985,6 @@ } case _CHECK_VALIDITY____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -12839,42 +12994,43 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -12889,6 +13045,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -12898,17 +13059,14 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -12916,6 +13074,8 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -12930,7 +13090,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(2); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -12947,11 +13109,9 @@ } case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -12962,6 +13122,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -12972,7 +13134,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(2); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(2); assert(oparg & 1); /* Cached method object */ @@ -12981,21 +13147,20 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_SUBSCR____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -13007,10 +13172,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13020,18 +13185,18 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: { - _PyStackRef owner; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -13039,6 +13204,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -13050,6 +13216,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -13061,11 +13229,9 @@ } case _GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -13085,6 +13251,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -13092,40 +13261,42 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____SET_IP: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -13135,7 +13306,6 @@ } case _CHECK_VALIDITY____LOAD_FAST____SET_IP: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13145,13 +13315,14 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -13161,11 +13332,9 @@ } case _GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_KEYS_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -13177,7 +13346,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); /* Cached method object */ @@ -13186,11 +13359,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13202,12 +13375,11 @@ } case _LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; - _PyStackRef value; // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -13218,11 +13390,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13232,30 +13404,28 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____BINARY_SUBSCR: { - _PyStackRef value; - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -13263,7 +13433,10 @@ } // _BINARY_SUBSCR { - sub = value; + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; + sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); PyObject *sub_o = PyStackRef_AsPyObjectBorrow(sub); @@ -13274,19 +13447,18 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_NEXT_LIST____STORE_FAST____LOAD_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -13295,34 +13467,33 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -13330,6 +13501,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -13341,7 +13513,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(2); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(2); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -13350,30 +13526,27 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_SLOT is split on (oparg & 1) */ case _LOAD_FAST____SET_IP____CHECK_FUNCTION_EXACT_ARGS: { - _PyStackRef value; - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -13381,9 +13554,9 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(2); - stack_pointer += -oparg; - assert(WITHIN_STACK_BOUNDS()); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -13399,11 +13572,10 @@ } case _GUARD_BOTH_INT____BINARY_OP_ADD_INT____SET_IP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -13419,6 +13591,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -13427,10 +13604,10 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -13440,7 +13617,6 @@ } case _CHECK_VALIDITY____RESUME_CHECK____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13474,29 +13650,28 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____GUARD_BOTH_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -13504,7 +13679,9 @@ } // _GUARD_BOTH_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -13521,43 +13698,44 @@ } case _LOAD_FAST____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST____STORE_FAST: { - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(0); seq = stack_pointer[-1]; assert(oparg == 2); @@ -13574,32 +13752,33 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = val1; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13609,28 +13788,27 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____LOAD_FAST____GUARD_BOTH_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13640,16 +13818,19 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -13666,31 +13847,32 @@ } case _LOAD_FAST____LOAD_FAST____GUARD_BOTH_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; - left = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!PyFloat_CheckExact(left_o)) { @@ -13706,28 +13888,29 @@ } case _STORE_FAST____LOAD_FAST____GUARD_TYPE_VERSION: { - _PyStackRef value; - _PyStackRef owner; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -13742,11 +13925,10 @@ /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT____GUARD_BOTH_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_FLOAT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -13762,6 +13944,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -13771,13 +13958,15 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -13794,10 +13983,9 @@ } case _TO_BOOL_BOOL____GUARD_IS_FALSE_POP____LOAD_FAST: { - _PyStackRef value; - _PyStackRef flag; // _TO_BOOL_BOOL { + _PyStackRef value; value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UOP_STAT_INC(uopcode, miss); @@ -13807,7 +13995,8 @@ } // _GUARD_IS_FALSE_POP { - flag = value; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -13818,20 +14007,18 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____COMPARE_OP_INT____CHECK_VALIDITY: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -13839,6 +14026,9 @@ } // _COMPARE_OP_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -13863,10 +14053,10 @@ PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);(void)right; res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13880,7 +14070,6 @@ /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _SET_IP____LOAD_DEREF____CHECK_VALIDITY: { - _PyStackRef value; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -13888,6 +14077,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(1); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -13898,10 +14088,10 @@ if (true) JUMP_TO_ERROR(1); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13913,12 +14103,11 @@ } case _BINARY_OP_ADD_INT____STORE_FAST____LOAD_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -13929,34 +14118,36 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_DEREF____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef value; // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(0); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -13967,10 +14158,10 @@ if (true) JUMP_TO_ERROR(0); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -13980,34 +14171,36 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_CONST_INLINE_BORROW____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -14017,15 +14210,15 @@ } case _STORE_FAST____SET_IP____LOAD_DEREF: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -14033,6 +14226,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(2); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -14043,77 +14237,77 @@ if (true) JUMP_TO_ERROR(2); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____STORE_FAST____STORE_FAST: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____STORE_FAST____LOAD_FAST: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CALL_BUILTIN_FAST____CHECK_VALIDITY: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -14121,6 +14315,10 @@ } // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -14167,10 +14365,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -14182,19 +14380,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____CALL_BUILTIN_FAST: { - _PyStackRef value; - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -14202,9 +14396,11 @@ } // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(2); - stack_pointer += -oparg; - assert(WITHIN_STACK_BOUNDS()); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -14250,17 +14446,14 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_BOTH_INT____BINARY_OP_SUBTRACT_INT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -14268,6 +14461,8 @@ } // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -14283,6 +14478,11 @@ } // _BINARY_OP_SUBTRACT_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -14291,22 +14491,21 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_SLOT is split on (oparg & 1) */ case _CONTAINS_OP____CHECK_VALIDITY____GUARD_IS_TRUE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; - _PyStackRef flag; // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -14319,10 +14518,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(0); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -14332,7 +14531,8 @@ } // _GUARD_IS_TRUE_POP { - flag = b; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -14345,13 +14545,9 @@ } case _GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -14371,6 +14567,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -14378,14 +14577,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(2); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -14400,18 +14602,15 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____STORE_SUBSCR_LIST_INT____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef list_st; - _PyStackRef sub_st; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -14419,6 +14618,9 @@ } // _STORE_SUBSCR_LIST_INT { + _PyStackRef sub_st; + _PyStackRef list_st; + _PyStackRef value; sub_st = stack_pointer[-1]; list_st = stack_pointer[-2]; value = stack_pointer[-3]; @@ -14458,9 +14660,9 @@ Py_DECREF(old_value); PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(list_st); + stack_pointer += -3; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -3; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -14472,11 +14674,9 @@ } case _GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT____SET_IP: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -14488,7 +14688,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -14497,11 +14701,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -14511,11 +14715,11 @@ } case _LOAD_ATTR_METHOD_NO_DICT____SET_IP____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -14526,11 +14730,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -14547,14 +14751,10 @@ } case _ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -14563,14 +14763,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(1); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -14585,28 +14788,29 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_OP_MULTIPLY_FLOAT____GUARD_BOTH_FLOAT____BINARY_OP_ADD_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -14618,13 +14822,15 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -14639,6 +14845,11 @@ } // _BINARY_OP_ADD_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -14648,41 +14859,44 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SWAP____SWAP____SET_IP: { - _PyStackRef bottom_in; - _PyStackRef *unused; - _PyStackRef top_in; - _PyStackRef top_out; - _PyStackRef bottom_out; // _SWAP { + _PyStackRef top_in; + _PyStackRef bottom_in; + _PyStackRef top_out; + _PyStackRef bottom_out; oparg = CURRENT_OPARG(0); top_in = stack_pointer[-1]; bottom_in = stack_pointer[-2 - (oparg-2)]; bottom_out = bottom_in;(void)bottom_in; top_out = top_in;(void)top_in; assert(oparg >= 2); + stack_pointer[-2 - (oparg-2)] = top_out; + stack_pointer[-1] = bottom_out; } - stack_pointer[-2 - (oparg-2)] = top_out; - stack_pointer[-1] = bottom_out; // _SWAP { + _PyStackRef top_in; + _PyStackRef bottom_in; + _PyStackRef top_out; + _PyStackRef bottom_out; oparg = CURRENT_OPARG(1); - top_in = bottom_out; - bottom_in = top_out; + top_in = stack_pointer[-1]; + bottom_in = stack_pointer[-2 - (oparg-2)]; bottom_out = bottom_in;(void)bottom_in; top_out = top_in;(void)top_in; assert(oparg >= 2); + stack_pointer[-2 - (oparg-2)] = top_out; + stack_pointer[-1] = bottom_out; } - stack_pointer[-2 - (oparg-2)] = top_out; - stack_pointer[-1] = bottom_out; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -14692,18 +14906,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____BINARY_OP: { - _PyStackRef value; - _PyStackRef lhs; - _PyStackRef rhs; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -14711,8 +14922,11 @@ } // _BINARY_OP { + _PyStackRef rhs; + _PyStackRef lhs; + _PyStackRef res; oparg = CURRENT_OPARG(2); - rhs = value; + rhs = stack_pointer[-1]; lhs = stack_pointer[-2]; PyObject *lhs_o = PyStackRef_AsPyObjectBorrow(lhs); PyObject *rhs_o = PyStackRef_AsPyObjectBorrow(rhs); @@ -14724,80 +14938,81 @@ PyStackRef_CLOSE(rhs); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW____LOAD_CONST_INLINE_BORROW: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____PUSH_NULL____LOAD_FAST: { - _PyStackRef value; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _PUSH_NULL { + _PyStackRef res; res = PyStackRef_NULL; + stack_pointer[0] = res; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = res; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -14809,7 +15024,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -14818,11 +15037,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -14834,22 +15053,22 @@ } case _LOAD_FAST____BINARY_SUBSCR_STR_INT____LOAD_FAST: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -14881,29 +15100,29 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_SUBSCR_STR_INT____LOAD_FAST____SET_IP: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -14936,19 +15155,20 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -14958,8 +15178,6 @@ } case _CHECK_VALIDITY____TO_BOOL_BOOL____GUARD_IS_TRUE_POP: { - _PyStackRef value; - _PyStackRef flag; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -14969,6 +15187,7 @@ } // _TO_BOOL_BOOL { + _PyStackRef value; value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UOP_STAT_INC(uopcode, miss); @@ -14978,7 +15197,8 @@ } // _GUARD_IS_TRUE_POP { - flag = value; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -14991,8 +15211,6 @@ } case _CHECK_VALIDITY____GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef flag; - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15002,6 +15220,7 @@ } // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -15013,29 +15232,30 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(3); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -15047,21 +15267,23 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -15071,18 +15293,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____COMPARE_OP_STR____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -15090,8 +15309,11 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(2); - right = value; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -15105,10 +15327,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15120,27 +15342,25 @@ } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP____COMPARE_OP_STR: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -15148,9 +15368,12 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(3); - right = value; - left = value; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(COMPARE_OP, hit); @@ -15163,18 +15386,14 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____COMPARE_OP_STR____CHECK_VALIDITY____GUARD_IS_FALSE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef flag; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -15182,6 +15401,9 @@ } // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -15197,10 +15419,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15210,7 +15432,8 @@ } // _GUARD_IS_FALSE_POP { - flag = res; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -15223,18 +15446,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____GUARD_BOTH_INT____BINARY_OP_ADD_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -15242,7 +15462,9 @@ } // _GUARD_BOTH_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -15257,6 +15479,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -15265,34 +15492,33 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP____GUARD_BOTH_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -15300,8 +15526,10 @@ } // _GUARD_BOTH_INT { - right = value; - left = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!PyLong_CheckExact(left_o)) { @@ -15317,13 +15545,11 @@ } case _COMPARE_OP_STR____CHECK_VALIDITY____GUARD_IS_FALSE_POP____LOAD_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef flag; - _PyStackRef value; // _COMPARE_OP_STR { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -15339,10 +15565,10 @@ assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS); res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False; // It's always a bool, so we don't care about oparg & 16. + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15352,7 +15578,8 @@ } // _GUARD_IS_FALSE_POP { - flag = res; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -15363,30 +15590,28 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____CONTAINS_OP____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -15394,8 +15619,11 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(2); - right = value; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -15406,10 +15634,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(2); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15421,10 +15649,6 @@ } case _SET_IP____GUARD_BOTH_INT____BINARY_OP_ADD_INT____STORE_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -15432,6 +15656,8 @@ } // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -15447,6 +15673,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -15455,26 +15686,23 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CONTAINS_OP____CHECK_VALIDITY____GUARD_IS_FALSE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; - _PyStackRef flag; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -15482,6 +15710,9 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -15494,10 +15725,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(1); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15507,7 +15738,8 @@ } // _GUARD_IS_FALSE_POP { - flag = b; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -15522,28 +15754,26 @@ /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _LOAD_FAST____LOAD_FAST____SET_IP____CONTAINS_OP: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -15551,9 +15781,12 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(3); - right = value; - left = value; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); _PyFrame_SetStackPointer(frame, stack_pointer); @@ -15563,21 +15796,19 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(3); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CONTAINS_OP____CHECK_VALIDITY____GUARD_IS_FALSE_POP____LOAD_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; - _PyStackRef flag; - _PyStackRef value; // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(0); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -15590,10 +15821,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(0); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15603,7 +15834,8 @@ } // _GUARD_IS_FALSE_POP { - flag = b; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -15614,43 +15846,46 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -15660,8 +15895,6 @@ } case _CHECK_VALIDITY____GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_FAST: { - _PyStackRef flag; - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -15671,6 +15904,7 @@ } // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -15682,30 +15916,31 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_IS_FALSE_POP____LOAD_FAST____LOAD_FAST____SET_IP: { - _PyStackRef flag; - _PyStackRef value; // _GUARD_IS_FALSE_POP { + _PyStackRef flag; flag = stack_pointer[-1]; int is_false = PyStackRef_IsFalse(flag);(void)flag; stack_pointer += -1; @@ -15717,22 +15952,24 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -15742,13 +15979,9 @@ } case _CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET____PUSH_FRAME: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(0); callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -15765,9 +15998,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(1); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -15776,10 +16014,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(2); @@ -15792,6 +16030,8 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; + new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. assert(tstate->interp->eval_frame == NULL); @@ -15811,13 +16051,10 @@ } case _CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(0); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -15832,7 +16069,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(1); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -15847,8 +16086,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(2); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -15857,10 +16102,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(3); @@ -15875,22 +16120,22 @@ } case _LOAD_FAST____BINARY_SUBSCR_STR_INT____STORE_FAST____LOAD_FAST: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -15922,37 +16167,38 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_SUBSCR_STR_INT____STORE_FAST____LOAD_FAST____LOAD_CONST_INLINE_BORROW: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -15985,65 +16231,69 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(3); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____BINARY_SUBSCR_STR_INT____STORE_FAST: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; - str_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; + str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); if (!PyLong_CheckExact(sub)) { @@ -16074,28 +16324,29 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _INIT_CALL_PY_EXACT_ARGS____SAVE_RETURN_OFFSET____PUSH_FRAME____CHECK_VALIDITY: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(0); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; @@ -16108,10 +16359,10 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(1); @@ -16124,6 +16375,8 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; + new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. assert(tstate->interp->eval_frame == NULL); @@ -16150,7 +16403,6 @@ } case _SAVE_RETURN_OFFSET____PUSH_FRAME____CHECK_VALIDITY____RESUME_CHECK: { - _PyInterpreterFrame *new_frame; // _SAVE_RETURN_OFFSET { oparg = CURRENT_OPARG(0); @@ -16163,6 +16415,7 @@ } // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -16214,11 +16467,9 @@ } case _GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE____CHECK_VALIDITY____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -16229,6 +16480,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -16238,10 +16492,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(1); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16251,20 +16505,20 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_CHECK_RANGE____GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE____CHECK_VALIDITY: { - _PyStackRef iter; - _PyStackRef next; // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -16274,6 +16528,8 @@ } // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); if (r->len <= 0) { @@ -16283,6 +16539,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -16292,10 +16551,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(2); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16307,8 +16566,6 @@ } case _SET_IP____ITER_CHECK_RANGE____GUARD_NOT_EXHAUSTED_RANGE____ITER_NEXT_RANGE: { - _PyStackRef iter; - _PyStackRef next; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -16316,6 +16573,7 @@ } // _ITER_CHECK_RANGE { + _PyStackRef iter; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Py_TYPE(r) != &PyRangeIter_Type) { @@ -16325,6 +16583,8 @@ } // _GUARD_NOT_EXHAUSTED_RANGE { + _PyStackRef iter; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); if (r->len <= 0) { @@ -16334,6 +16594,9 @@ } // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); assert(r->len > 0); @@ -16343,19 +16606,14 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(3); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE____INIT_CALL_PY_EXACT_ARGS: { - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; - _PyStackRef *args; - _PyInterpreterFrame *new_frame; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -16363,6 +16621,8 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(1); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -16377,7 +16637,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(2); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -16392,8 +16654,14 @@ } // _INIT_CALL_PY_EXACT_ARGS { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyInterpreterFrame *new_frame; oparg = CURRENT_OPARG(3); args = &stack_pointer[-oparg]; + self_or_null = &stack_pointer[-1 - oparg]; + callable = &stack_pointer[-2 - oparg]; int has_self = !PyStackRef_IsNull(self_or_null[0]); STAT_INC(CALL, hit); new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame); @@ -16402,19 +16670,17 @@ for (int i = 0; i < oparg; i++) { first_non_self_local[i] = args[i]; } + stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg].bits = (uintptr_t)new_frame; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -16426,6 +16692,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -16435,6 +16703,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -16445,7 +16715,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(3); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(3); assert(oparg & 1); /* Cached method object */ @@ -16454,16 +16728,15 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION: { - _PyStackRef owner; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -16471,6 +16744,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -16482,6 +16756,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -16491,6 +16767,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(3); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -16503,11 +16781,9 @@ } case _ITER_CHECK_LIST____GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_CHECK_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -16516,6 +16792,8 @@ } // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -16534,6 +16812,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -16541,33 +16822,33 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____GUARD_TYPE_VERSION____GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: { - _PyStackRef value; - _PyStackRef owner; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -16575,7 +16856,8 @@ } // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -16586,6 +16868,8 @@ } // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); if (!_PyObject_InlineValues(owner_o)->valid) { @@ -16597,11 +16881,9 @@ } case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT____GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT { + _PyStackRef owner; owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -16612,6 +16894,8 @@ } // _GUARD_KEYS_VERSION { + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls; @@ -16622,7 +16906,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(2); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(2); assert(oparg & 1); /* Cached method object */ @@ -16631,11 +16919,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16647,12 +16935,9 @@ } case _GUARD_KEYS_VERSION____LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; - _PyStackRef value; // _GUARD_KEYS_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t keys_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -16664,7 +16949,11 @@ } // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); /* Cached method object */ @@ -16673,11 +16962,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16687,22 +16976,22 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_NEXT_RANGE____CHECK_VALIDITY____STORE_FAST____LOAD_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_NEXT_RANGE { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); assert(Py_TYPE(r) == &PyRangeIter_Type); @@ -16713,10 +17002,10 @@ PyObject *res = PyLong_FromLong(value); if (res == NULL) JUMP_TO_ERROR(0); next = PyStackRef_FromPyObjectSteal(res); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16726,44 +17015,46 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____SET_IP____GUARD_TYPE_VERSION: { - _PyStackRef value; - _PyStackRef owner; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -16771,7 +17062,8 @@ } // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(3); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -16784,11 +17076,9 @@ } case _GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____STORE_FAST____LOAD_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -16808,6 +17098,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -16815,44 +17108,43 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____SET_IP____CHECK_FUNCTION_EXACT_ARGS____CHECK_STACK_SPACE: { - _PyStackRef value; - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -16860,9 +17152,9 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(2); - stack_pointer += -oparg; - assert(WITHIN_STACK_BOUNDS()); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -16876,7 +17168,9 @@ } // _CHECK_STACK_SPACE { + _PyStackRef *callable; oparg = CURRENT_OPARG(3); + callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); PyFunctionObject *func = (PyFunctionObject *)callable_o; PyCodeObject *code = (PyCodeObject *)func->func_code; @@ -16893,9 +17187,6 @@ } case _SET_IP____GUARD_BOTH_INT____BINARY_OP_ADD_INT____SET_IP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -16903,6 +17194,8 @@ } // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -16918,6 +17211,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -16926,10 +17224,10 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -16939,19 +17237,16 @@ } case _LOAD_FAST____SET_IP____BINARY_SUBSCR____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -16959,7 +17254,10 @@ } // _BINARY_SUBSCR { - sub = value; + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; + sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); PyObject *sub_o = PyStackRef_AsPyObjectBorrow(sub); @@ -16970,10 +17268,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -16985,10 +17283,9 @@ } case _PUSH_FRAME____CHECK_VALIDITY____RESUME_CHECK____LOAD_FAST: { - _PyInterpreterFrame *new_frame; - _PyStackRef value; // _PUSH_FRAME { + _PyInterpreterFrame *new_frame; new_frame = (_PyInterpreterFrame *)stack_pointer[-1].bits; // Write it out explicitly because it's subtly different. // Eventually this should be the only occurrence of this code. @@ -17038,45 +17335,48 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____LOAD_FAST____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -17086,10 +17386,6 @@ } case _SET_IP____BINARY_SUBSCR____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; - _PyStackRef value; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -17097,6 +17393,9 @@ } // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -17108,10 +17407,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17121,44 +17420,47 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____LOAD_FAST____SET_IP: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -17168,14 +17470,11 @@ } case _BINARY_SUBSCR____CHECK_VALIDITY____LOAD_FAST____GUARD_BOTH_FLOAT: { - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _BINARY_SUBSCR { + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); @@ -17187,10 +17486,10 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17200,17 +17499,20 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; - left = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!PyFloat_CheckExact(left_o)) { @@ -17226,50 +17528,52 @@ } case _LOAD_FAST____LOAD_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _CHECK_VALIDITY____STORE_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17279,60 +17583,63 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; - left = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!PyFloat_CheckExact(left_o)) { @@ -17346,6 +17653,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -17355,36 +17667,34 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____SET_IP____CHECK_FUNCTION_EXACT_ARGS: { - _PyStackRef value; - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *unused; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -17392,9 +17702,9 @@ } // _CHECK_FUNCTION_EXACT_ARGS { + _PyStackRef *self_or_null; + _PyStackRef *callable; oparg = CURRENT_OPARG(3); - stack_pointer += -oparg; - assert(WITHIN_STACK_BOUNDS()); self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]); @@ -17410,19 +17720,16 @@ } case _LOAD_FAST____SET_IP____GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT: { - _PyStackRef value; - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -17430,7 +17737,8 @@ } // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -17441,7 +17749,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(3); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(3); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -17450,30 +17762,27 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } /* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */ case _LOAD_FAST____SET_IP____GUARD_BOTH_INT____BINARY_OP_ADD_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -17481,7 +17790,9 @@ } // _GUARD_BOTH_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -17496,6 +17807,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -17504,20 +17820,18 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_BOTH_INT____BINARY_OP_ADD_INT____STORE_FAST____LOAD_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _GUARD_BOTH_INT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -17533,6 +17847,11 @@ } // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -17541,32 +17860,33 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____LOAD_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17576,36 +17896,38 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____LOAD_DEREF____CHECK_VALIDITY____LOAD_FAST: { - _PyStackRef value; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -17613,6 +17935,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(1); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -17623,10 +17946,10 @@ if (true) JUMP_TO_ERROR(1); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17636,26 +17959,27 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____SET_IP____LOAD_DEREF____CHECK_VALIDITY: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -17663,6 +17987,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(2); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -17673,10 +17998,10 @@ if (true) JUMP_TO_ERROR(2); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17688,33 +18013,35 @@ } case _LOAD_FAST____LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -17724,12 +18051,11 @@ } case _LOAD_ATTR_METHOD_WITH_VALUES____CHECK_VALIDITY____LOAD_FAST____LOAD_FAST: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; - _PyStackRef value; // _LOAD_ATTR_METHOD_WITH_VALUES { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(0); owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(0); @@ -17740,11 +18066,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17754,28 +18080,28 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _CHECK_VALIDITY____STORE_FAST____LOAD_FAST____GUARD_TYPE_VERSION: { - _PyStackRef value; - _PyStackRef owner; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17785,24 +18111,27 @@ } // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(3); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -17817,10 +18146,6 @@ /* _LOAD_ATTR_SLOT is split on (oparg & 1) */ case _SET_IP____CONTAINS_OP____CHECK_VALIDITY____GUARD_IS_TRUE_POP: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; - _PyStackRef flag; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -17828,6 +18153,9 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(1); right = stack_pointer[-1]; left = stack_pointer[-2]; @@ -17840,10 +18168,10 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(1); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -17853,7 +18181,8 @@ } // _GUARD_IS_TRUE_POP { - flag = b; + _PyStackRef flag; + flag = stack_pointer[-1]; int is_true = PyStackRef_IsTrue(flag);(void)flag; stack_pointer += -1; assert(WITHIN_STACK_BOUNDS()); @@ -17866,28 +18195,26 @@ } case _LOAD_FAST____LOAD_FAST____SET_IP____BINARY_SUBSCR: { - _PyStackRef value; - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -17895,8 +18222,11 @@ } // _BINARY_SUBSCR { - sub = value; - container = value; + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; + sub = stack_pointer[-1]; + container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); PyObject *sub_o = PyStackRef_AsPyObjectBorrow(sub); _PyFrame_SetStackPointer(frame, stack_pointer); @@ -17906,30 +18236,29 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT____GUARD_BOTH_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -17944,6 +18273,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -17953,13 +18287,15 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -17976,19 +18312,15 @@ } case _LOAD_CONST_INLINE_BORROW____SET_IP____CALL_BUILTIN_FAST____CHECK_VALIDITY: { - _PyStackRef value; - _PyStackRef *callable; - _PyStackRef *self_or_null; - _PyStackRef *args; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -17996,9 +18328,11 @@ } // _CALL_BUILTIN_FAST { + _PyStackRef *args; + _PyStackRef *self_or_null; + _PyStackRef *callable; + _PyStackRef res; oparg = CURRENT_OPARG(2); - stack_pointer += -oparg; - assert(WITHIN_STACK_BOUNDS()); args = &stack_pointer[-oparg]; self_or_null = &stack_pointer[-1 - oparg]; callable = &stack_pointer[-2 - oparg]; @@ -18044,10 +18378,10 @@ PyStackRef_CLOSE(callable[0]); if (res_o == NULL) JUMP_TO_ERROR(2); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2 - oparg] = res; + stack_pointer += -1 - oparg; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2 - oparg] = res; - stack_pointer += -1 - oparg; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -18059,13 +18393,9 @@ } case _ITER_CHECK_LIST____GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; // _ITER_CHECK_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -18074,6 +18404,8 @@ } // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -18092,6 +18424,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -18099,14 +18434,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(3); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -18121,36 +18459,35 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_FAST____SET_IP____GUARD_BOTH_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -18158,8 +18495,10 @@ } // _GUARD_BOTH_INT { - right = value; - left = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!PyLong_CheckExact(left_o)) { @@ -18175,9 +18514,9 @@ } case _LOAD_DEREF____CHECK_VALIDITY____LOAD_FAST____SET_IP: { - _PyStackRef value; // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(0); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -18188,10 +18527,10 @@ if (true) JUMP_TO_ERROR(0); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -18201,13 +18540,14 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -18217,11 +18557,9 @@ } case _GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT____SET_IP____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(0); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -18233,7 +18571,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(1); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(1); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -18242,11 +18584,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -18263,14 +18605,10 @@ } case _ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -18279,14 +18617,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(1); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -18301,39 +18642,36 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = val1; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_NOT_EXHAUSTED_LIST____ITER_NEXT_LIST____UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _GUARD_NOT_EXHAUSTED_LIST { + _PyStackRef iter; iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; @@ -18353,6 +18691,9 @@ } // _ITER_NEXT_LIST { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyListIterObject *it = (_PyListIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyListIter_Type); @@ -18360,14 +18701,17 @@ assert(seq); assert(it->it_index < PyList_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(2); - seq = next; + seq = stack_pointer[-1]; assert(oparg == 2); PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq); if (!PyTuple_CheckExact(seq_o)) { @@ -18382,28 +18726,28 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT____GUARD_BOTH_FLOAT____BINARY_OP_ADD_FLOAT: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _GUARD_BOTH_FLOAT { + _PyStackRef right; + _PyStackRef left; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -18419,6 +18763,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -18428,13 +18777,15 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(1); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = res; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -18449,6 +18800,11 @@ } // _BINARY_OP_ADD_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -18458,17 +18814,14 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _SET_IP____GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT____SET_IP: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -18476,6 +18829,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -18487,7 +18841,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(2); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(2); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -18496,11 +18854,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -18510,10 +18868,6 @@ } case _CHECK_VALIDITY____LOAD_FAST____GUARD_BOTH_FLOAT____BINARY_OP_MULTIPLY_FLOAT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -18523,16 +18877,19 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_BOTH_FLOAT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -18547,6 +18904,11 @@ } // _BINARY_OP_MULTIPLY_FLOAT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -18556,40 +18918,42 @@ PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____LOAD_CONST_INLINE_BORROW____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(1); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -18599,32 +18963,33 @@ } case _LOAD_FAST____LOAD_FAST____BINARY_SUBSCR_STR_INT____LOAD_FAST: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; - str_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; + str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); if (!PyLong_CheckExact(sub)) { @@ -18655,32 +19020,29 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_SUBSCR_STR_INT____LOAD_FAST____SET_IP____CONTAINS_OP: { - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef b; // _BINARY_SUBSCR_STR_INT { + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); @@ -18713,19 +19075,20 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -18733,9 +19096,12 @@ } // _CONTAINS_OP { + _PyStackRef right; + _PyStackRef left; + _PyStackRef b; oparg = CURRENT_OPARG(3); - right = value; - left = res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); _PyFrame_SetStackPointer(frame, stack_pointer); @@ -18745,30 +19111,30 @@ PyStackRef_CLOSE(right); if (res < 0) JUMP_TO_ERROR(3); b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False; + stack_pointer[-2] = b; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = b; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_FAST____BINARY_SUBSCR_STR_INT____LOAD_FAST____SET_IP: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); @@ -18800,19 +19166,20 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -18822,9 +19189,6 @@ } case _SET_IP____GUARD_TYPE_VERSION____LOAD_ATTR_METHOD_NO_DICT____CHECK_VALIDITY: { - _PyStackRef owner; - _PyStackRef attr; - _PyStackRef self = PyStackRef_NULL; // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(0); @@ -18832,6 +19196,7 @@ } // _GUARD_TYPE_VERSION { + _PyStackRef owner; owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(1); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); @@ -18843,7 +19208,11 @@ } // _LOAD_ATTR_METHOD_NO_DICT { + _PyStackRef owner; + _PyStackRef attr; + _PyStackRef self = PyStackRef_NULL; oparg = CURRENT_OPARG(2); + owner = stack_pointer[-1]; PyObject *descr = (PyObject *)CURRENT_OPERAND0(2); assert(oparg & 1); assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0); @@ -18852,11 +19221,11 @@ assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)); attr = PyStackRef_FromPyObjectNew(descr); self = owner;(void)owner; + stack_pointer[-1] = attr; + stack_pointer[0] = self; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = attr; - stack_pointer[0] = self; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -18868,10 +19237,6 @@ } case _CHECK_VALIDITY____LOAD_FAST____SET_IP____BINARY_SUBSCR: { - _PyStackRef value; - _PyStackRef container; - _PyStackRef sub; - _PyStackRef res; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -18881,13 +19246,14 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -18895,7 +19261,10 @@ } // _BINARY_SUBSCR { - sub = value; + _PyStackRef sub; + _PyStackRef container; + _PyStackRef res; + sub = stack_pointer[-1]; container = stack_pointer[-2]; PyObject *container_o = PyStackRef_AsPyObjectBorrow(container); PyObject *sub_o = PyStackRef_AsPyObjectBorrow(sub); @@ -18906,19 +19275,17 @@ PyStackRef_CLOSE(sub); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _ITER_CHECK_TUPLE____GUARD_NOT_EXHAUSTED_TUPLE____ITER_NEXT_TUPLE____STORE_FAST: { - _PyStackRef iter; - _PyStackRef next; - _PyStackRef value; // _ITER_CHECK_TUPLE { + _PyStackRef iter; iter = stack_pointer[-1]; if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyTupleIter_Type) { UOP_STAT_INC(uopcode, miss); @@ -18927,6 +19294,8 @@ } // _GUARD_NOT_EXHAUSTED_TUPLE { + _PyStackRef iter; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyTupleIter_Type); @@ -18942,6 +19311,9 @@ } // _ITER_NEXT_TUPLE { + _PyStackRef iter; + _PyStackRef next; + iter = stack_pointer[-1]; PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o; assert(Py_TYPE(iter_o) == &PyTupleIter_Type); @@ -18949,34 +19321,32 @@ assert(seq); assert(it->it_index < PyTuple_GET_SIZE(seq)); next = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq, it->it_index++)); + stack_pointer[0] = next; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = next; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); - value = next; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _LOAD_CONST_INLINE_BORROW____SET_IP____GUARD_BOTH_INT____BINARY_OP_SUBTRACT_INT: { - _PyStackRef value; - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(0); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(1); @@ -18984,7 +19354,9 @@ } // _GUARD_BOTH_INT { - right = value; + _PyStackRef right; + _PyStackRef left; + right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); @@ -18999,6 +19371,11 @@ } // _BINARY_OP_SUBTRACT_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; + right = stack_pointer[-1]; + left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); PyObject *right_o = PyStackRef_AsPyObjectBorrow(right); STAT_INC(BINARY_OP, hit); @@ -19007,20 +19384,19 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(3); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _BINARY_OP_ADD_INT____STORE_FAST____LOAD_FAST____LOAD_FAST: { - _PyStackRef left; - _PyStackRef right; - _PyStackRef res; - _PyStackRef value; // _BINARY_OP_ADD_INT { + _PyStackRef right; + _PyStackRef left; + _PyStackRef res; right = stack_pointer[-1]; left = stack_pointer[-2]; PyObject *left_o = PyStackRef_AsPyObjectBorrow(left); @@ -19031,57 +19407,61 @@ PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc); if (res_o == NULL) JUMP_TO_ERROR(0); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = res; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(3); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____STORE_FAST____SET_IP____LOAD_DEREF: { - _PyStackRef value; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(2); @@ -19089,6 +19469,7 @@ } // _LOAD_DEREF { + _PyStackRef value; oparg = CURRENT_OPARG(3); PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg)); PyObject *value_o = PyCell_GetRef(cell); @@ -19099,20 +19480,19 @@ if (true) JUMP_TO_ERROR(3); } value = PyStackRef_FromPyObjectSteal(value_o); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); break; } case _UNPACK_SEQUENCE_TWO_TUPLE____STORE_FAST____STORE_FAST____SET_IP: { - _PyStackRef seq; - _PyStackRef val1; - _PyStackRef val0; - _PyStackRef value; // _UNPACK_SEQUENCE_TWO_TUPLE { + _PyStackRef seq; + _PyStackRef val1; + _PyStackRef val0; oparg = CURRENT_OPARG(0); seq = stack_pointer[-1]; assert(oparg == 2); @@ -19129,27 +19509,29 @@ val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0)); val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1)); PyStackRef_CLOSE(seq); + stack_pointer[-1] = val1; + stack_pointer[0] = val0; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-1] = val1; - stack_pointer[0] = val0; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); - value = val0; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); - value = val1; + value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); @@ -19159,40 +19541,42 @@ } case _STORE_FAST____LOAD_FAST____LOAD_FAST____BINARY_SUBSCR_STR_INT: { - _PyStackRef value; - _PyStackRef str_st; - _PyStackRef sub_st; - _PyStackRef res; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(2); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _BINARY_SUBSCR_STR_INT { - sub_st = value; - str_st = value; + _PyStackRef sub_st; + _PyStackRef str_st; + _PyStackRef res; + sub_st = stack_pointer[-1]; + str_st = stack_pointer[-2]; PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st); PyObject *str = PyStackRef_AsPyObjectBorrow(str_st); if (!PyLong_CheckExact(sub)) { @@ -19223,36 +19607,37 @@ PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);(void)sub_st; PyStackRef_CLOSE(str_st); res = PyStackRef_FromPyObjectSteal(res_o); + stack_pointer[-2] = res; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[-2] = res; - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); break; } case _STORE_FAST____LOAD_FAST____GUARD_TYPE_VERSION____CHECK_MANAGED_OBJECT_HAS_VALUES: { - _PyStackRef value; - _PyStackRef owner; // _STORE_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(0); value = stack_pointer[-1]; SETLOCAL(oparg, value);(void)value; + stack_pointer += -1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer += -1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _GUARD_TYPE_VERSION { - owner = value; + _PyStackRef owner; + owner = stack_pointer[-1]; uint32_t type_version = (uint32_t)CURRENT_OPERAND0(2); PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner)); assert(type_version != 0); @@ -19263,6 +19648,8 @@ } // _CHECK_MANAGED_OBJECT_HAS_VALUES { + _PyStackRef owner; + owner = stack_pointer[-1]; PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); assert(Py_TYPE(owner_o)->tp_dictoffset < 0); assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES); @@ -19275,7 +19662,6 @@ } case _CHECK_VALIDITY____LOAD_FAST____LOAD_CONST_INLINE_BORROW____SET_IP: { - _PyStackRef value; // _CHECK_VALIDITY { if (!current_executor->vm_data.valid) { @@ -19285,21 +19671,23 @@ } // _LOAD_FAST { + _PyStackRef value; oparg = CURRENT_OPARG(1); assert(!PyStackRef_IsNull(GETLOCAL(oparg))); value = PyStackRef_DUP(GETLOCAL(oparg)); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _LOAD_CONST_INLINE_BORROW { + _PyStackRef value; PyObject *ptr = (PyObject *)CURRENT_OPERAND0(2); value = PyStackRef_FromPyObjectImmortal(ptr); + stack_pointer[0] = value; + stack_pointer += 1; + assert(WITHIN_STACK_BOUNDS()); } - stack_pointer[0] = value; - stack_pointer += 1; - assert(WITHIN_STACK_BOUNDS()); // _SET_IP { PyObject *instr_ptr = (PyObject *)CURRENT_OPERAND0(3); diff --git a/Tools/cases_generator/analyzer.py b/Tools/cases_generator/analyzer.py index 9ee15aa0abbfd6..d3c9fbfe90af3d 100644 --- a/Tools/cases_generator/analyzer.py +++ b/Tools/cases_generator/analyzer.py @@ -1227,8 +1227,6 @@ def analyze_forest(forest: list[parser.AstNode]) -> Analysis: if part.properties.needs_this: continue super_constituents.append(part) - elif isinstance(part, Flush): - super_constituents.append(part) if len(super_constituents) == 0: continue # permutations = [sup for sup in form_uop_valid_permutations(super_constituents) if MAX_SUPER_LEN >= len(sup) > 1] diff --git a/Tools/cases_generator/stack.py b/Tools/cases_generator/stack.py index 32bb9d191506d9..9471fe0e56f7d8 100644 --- a/Tools/cases_generator/stack.py +++ b/Tools/cases_generator/stack.py @@ -236,11 +236,10 @@ def pop(self, var: StackItem, extract_bits: bool = True) -> tuple[str, Local]: if self.variables: popped = self.variables.pop() if var.is_array() ^ popped.is_array(): - pass - # raise StackError( - # f"Array mismatch when popping '{popped.name}' from stack to assign to '{var.name}'. " - # f"Expected {array_or_scalar(var)} got {array_or_scalar(popped)}" - # ) + raise StackError( + f"Array mismatch when popping '{popped.name}' from stack to assign to '{var.name}'. " + f"Expected {array_or_scalar(var)} got {array_or_scalar(popped)}" + ) if popped.size != var.size: raise StackError( f"Size mismatch when popping '{popped.name}' from stack to assign to '{var.name}'. " @@ -248,10 +247,9 @@ def pop(self, var: StackItem, extract_bits: bool = True) -> tuple[str, Local]: ) if var.name in UNUSED: if popped.name not in UNUSED and popped.name in self.defined: - pass - # raise StackError( - # f"Value is declared unused, but is already cached by prior operation as '{popped.name}'" - # ) + raise StackError( + f"Value is declared unused, but is already cached by prior operation as '{popped.name}'" + ) return "", popped if not var.used: return "", popped diff --git a/Tools/cases_generator/tier2_generator.py b/Tools/cases_generator/tier2_generator.py index fed1ad3e6f414f..f76320e551400e 100644 --- a/Tools/cases_generator/tier2_generator.py +++ b/Tools/cases_generator/tier2_generator.py @@ -9,9 +9,6 @@ Analysis, Instruction, Uop, - Skip, - Part, - Flush, analyze_files, StackItem, analysis_error, @@ -29,7 +26,7 @@ from cwriter import CWriter from typing import TextIO, Iterator from lexer import Token -from stack import Local, Stack, StackError, Storage, apply_stack_effect +from stack import Local, Stack, StackError, Storage DEFAULT_OUTPUT = ROOT / "Python/executor_cases.c.h" @@ -222,88 +219,6 @@ def write_uop(uop: Uop, emitter: Tier2Emitter, stack: Stack) -> Stack: SKIPS = ("_EXTENDED_ARG",) -def write_super_uop_constituent( - uop: Part, - emitter: Tier2Emitter, - offset: int, - stack: Stack, - braces: bool, -) -> tuple[int, Stack]: - # out.emit(stack.as_comment() + "\n") - if isinstance(uop, Skip): - assert False - if isinstance(uop, Flush): - emitter.emit(f"// flush\n") - stack.flush(emitter.out) - return offset, stack - try: - locals: dict[str, Local] = {} - emitter.out.start_line() - if braces: - emitter.out.emit(f"// {uop.name}\n") - emitter.emit("{\n") - if uop.properties.oparg: - emitter.emit(f"oparg = CURRENT_OPARG({emitter.index});\n") - assert uop.properties.const_oparg < 0 - elif uop.properties.const_oparg >= 0: - emitter.emit(f"oparg = {uop.properties.const_oparg};\n") - emitter.emit(f"assert(oparg == CURRENT_OPARG({emitter.index}));\n") - - try: - code_list, storage = Storage.for_uop(stack, uop) - emitter._print_storage(storage) - for code in code_list: - emitter.emit(code) - except StackError: - stack.flush(emitter.out) - stack = Stack() - code_list, storage = Storage.for_uop(stack, uop) - emitter._print_storage(storage) - for code in code_list: - emitter.emit(code) - - for idx, cache in enumerate(uop.caches): - if cache.name != "unused": - if cache.size == 4: - type = cast = "PyObject *" - else: - type = f"uint{cache.size*16}_t " - cast = f"uint{cache.size*16}_t" - emitter.emit(f"{type}{cache.name} = ({cast})CURRENT_OPERAND{idx}({emitter.index});\n") - - storage = emitter.emit_tokens(uop, storage, None) - if braces: - emitter.out.start_line() - emitter.emit("}\n") - # emitter.emit(stack.as_comment() + "\n") - return offset, storage.stack - except StackError as ex: - raise analysis_error(ex.args[0], uop.body[0]) - -def super_declare_variable(var: StackItem, out: CWriter) -> None: - type, null = type_and_null(var) - space = " " if type[-1].isalnum() else "" - if var.condition: - out.emit(f"{type}{space}{var.name} = {null};\n") - else: - out.emit(f"{type}{space}{var.name};\n") - - -def super_declare_variables(inst: list[Uop], out: CWriter) -> None: - required = set() - for uop in inst: - for item in [*uop.stack.inputs, *uop.stack.outputs]: - required.add(item.name) - stack = Stack() - for part in inst: - for var in part.stack.inputs: - if var.name in required: - required.remove(var.name) - super_declare_variable(var, out) - for var in part.stack.outputs: - if var.name in required: - required.remove(var.name) - super_declare_variable(var, out) def generate_tier2( filenames: list[str], analysis: Analysis, outfile: TextIO, lines: bool @@ -373,15 +288,18 @@ def generate_tier2( continue out.emit(f"case {sup_name}: {{\n") - super_declare_variables(super_uop, out) - offset = 1 - stack = Stack() for idx, uop in enumerate(super_uop): + out.emit(f"// {uop.name}\n") + out.emit("{\n") + declare_variables(uop, out) + stack = Stack() emitter.index = idx - offset, stack = write_super_uop_constituent(uop, emitter, offset, stack, True) + stack = write_uop(uop, emitter, stack) out.start_line() if not uop.properties.always_exits: stack.flush(out) + out.emit("}\n") + out.start_line() out.emit("break;\n") out.start_line() out.emit("}")