@@ -1444,7 +1444,7 @@ dummy_func(
1444
1444
LOAD_ATTR_SLOT ,
1445
1445
LOAD_ATTR_CLASS ,
1446
1446
LOAD_ATTR_PROPERTY ,
1447
- // LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN,
1447
+ LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN ,
1448
1448
// LOAD_ATTR_METHOD_WITH_VALUES,
1449
1449
// LOAD_ATTR_METHOD_NO_DICT,
1450
1450
// LOAD_ATTR_METHOD_LAZY_DICT,
@@ -1620,20 +1620,14 @@ dummy_func(
1620
1620
DISPATCH_INLINED (new_frame );
1621
1621
}
1622
1622
1623
- // error: LOAD_ATTR has irregular stack effect
1624
- inst (LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN ) {
1623
+ inst (LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN , (unused /1 , type_version /2 , func_version /2 , getattribute /4 , owner -- unused if (oparg & 1 ), unused )) {
1625
1624
assert (cframe .use_tracing == 0 );
1626
1625
DEOPT_IF (tstate -> interp -> eval_frame , LOAD_ATTR );
1627
- _PyLoadMethodCache * cache = (_PyLoadMethodCache * )next_instr ;
1628
- PyObject * owner = TOP ();
1629
1626
PyTypeObject * cls = Py_TYPE (owner );
1630
- uint32_t type_version = read_u32 (cache -> type_version );
1631
1627
DEOPT_IF (cls -> tp_version_tag != type_version , LOAD_ATTR );
1632
1628
assert (type_version != 0 );
1633
- PyObject * getattribute = read_obj (cache -> descr );
1634
1629
assert (Py_IS_TYPE (getattribute , & PyFunction_Type ));
1635
1630
PyFunctionObject * f = (PyFunctionObject * )getattribute ;
1636
- uint32_t func_version = read_u32 (cache -> keys_version );
1637
1631
assert (func_version != 0 );
1638
1632
DEOPT_IF (f -> func_version != func_version , LOAD_ATTR );
1639
1633
PyCodeObject * code = (PyCodeObject * )f -> func_code ;
@@ -1644,6 +1638,7 @@ dummy_func(
1644
1638
PyObject * name = GETITEM (names , oparg >> 1 );
1645
1639
Py_INCREF (f );
1646
1640
_PyInterpreterFrame * new_frame = _PyFrame_PushUnchecked (tstate , f , 2 );
1641
+ // Manipulate stack directly because we exit with DISPATCH_INLINED().
1647
1642
SET_TOP (NULL );
1648
1643
int shrink_stack = !(oparg & 1 );
1649
1644
STACK_SHRINK (shrink_stack );
0 commit comments