@@ -1445,7 +1445,7 @@ dummy_func(
14451445 LOAD_ATTR_CLASS ,
14461446 LOAD_ATTR_PROPERTY ,
14471447 LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN ,
1448- // LOAD_ATTR_METHOD_WITH_VALUES,
1448+ LOAD_ATTR_METHOD_WITH_VALUES ,
14491449 // LOAD_ATTR_METHOD_NO_DICT,
14501450 // LOAD_ATTR_METHOD_LAZY_DICT,
14511451 };
@@ -2339,29 +2339,24 @@ dummy_func(
23392339
23402340 }
23412341
2342- // error: LOAD_ATTR has irregular stack effect
2343- inst (LOAD_ATTR_METHOD_WITH_VALUES ) {
2342+ inst (LOAD_ATTR_METHOD_WITH_VALUES , (unused /1 , type_version /2 , keys_version /2 , descr /4 , self -- res2 if (oparg & 1 ), res )) {
23442343 /* Cached method object */
23452344 assert (cframe .use_tracing == 0 );
2346- PyObject * self = TOP ();
23472345 PyTypeObject * self_cls = Py_TYPE (self );
2348- _PyLoadMethodCache * cache = (_PyLoadMethodCache * )next_instr ;
2349- uint32_t type_version = read_u32 (cache -> type_version );
23502346 assert (type_version != 0 );
23512347 DEOPT_IF (self_cls -> tp_version_tag != type_version , LOAD_ATTR );
23522348 assert (self_cls -> tp_flags & Py_TPFLAGS_MANAGED_DICT );
23532349 PyDictOrValues dorv = * _PyObject_DictOrValuesPointer (self );
23542350 DEOPT_IF (!_PyDictOrValues_IsValues (dorv ), LOAD_ATTR );
23552351 PyHeapTypeObject * self_heap_type = (PyHeapTypeObject * )self_cls ;
23562352 DEOPT_IF (self_heap_type -> ht_cached_keys -> dk_version !=
2357- read_u32 ( cache -> keys_version ) , LOAD_ATTR );
2353+ keys_version , LOAD_ATTR );
23582354 STAT_INC (LOAD_ATTR , hit );
2359- PyObject * res = read_obj (cache -> descr );
2360- assert (res != NULL );
2361- assert (_PyType_HasFeature (Py_TYPE (res ), Py_TPFLAGS_METHOD_DESCRIPTOR ));
2362- SET_TOP (Py_NewRef (res ));
2363- PUSH (self );
2364- JUMPBY (INLINE_CACHE_ENTRIES_LOAD_ATTR );
2355+ assert (descr != NULL );
2356+ res2 = Py_NewRef (descr );
2357+ assert (_PyType_HasFeature (Py_TYPE (res2 ), Py_TPFLAGS_METHOD_DESCRIPTOR ));
2358+ res = self ;
2359+ assert (oparg & 1 );
23652360 }
23662361
23672362 // error: LOAD_ATTR has irregular stack effect
0 commit comments