@@ -1809,6 +1809,8 @@ dummy_func(
1809
1809
LOAD_ATTR_METHOD_WITH_VALUES ,
1810
1810
LOAD_ATTR_METHOD_NO_DICT ,
1811
1811
LOAD_ATTR_METHOD_LAZY_DICT ,
1812
+ LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES ,
1813
+ LOAD_ATTR_NONDESCRIPTOR_NO_DICT ,
1812
1814
};
1813
1815
1814
1816
inst (LOAD_ATTR , (unused /9 , owner -- res2 if (oparg & 1 ), res )) {
@@ -2657,7 +2659,8 @@ dummy_func(
2657
2659
exc_info -> exc_value = Py_NewRef (new_exc );
2658
2660
}
2659
2661
2660
- inst (LOAD_ATTR_METHOD_WITH_VALUES , (unused /1 , type_version /2 , keys_version /2 , descr /4 , self -- res2 if (oparg & 1 ), res )) {
2662
+ inst (LOAD_ATTR_METHOD_WITH_VALUES , (unused /1 , type_version /2 , keys_version /2 , descr /4 , self -- res2 if (1 ), res )) {
2663
+ assert (oparg & 1 );
2661
2664
/* Cached method object */
2662
2665
PyTypeObject * self_cls = Py_TYPE (self );
2663
2666
assert (type_version != 0 );
@@ -2673,10 +2676,10 @@ dummy_func(
2673
2676
res2 = Py_NewRef (descr );
2674
2677
assert (_PyType_HasFeature (Py_TYPE (res2 ), Py_TPFLAGS_METHOD_DESCRIPTOR ));
2675
2678
res = self ;
2676
- assert (oparg & 1 );
2677
2679
}
2678
2680
2679
- inst (LOAD_ATTR_METHOD_NO_DICT , (unused /1 , type_version /2 , unused /2 , descr /4 , self -- res2 if (oparg & 1 ), res )) {
2681
+ inst (LOAD_ATTR_METHOD_NO_DICT , (unused /1 , type_version /2 , unused /2 , descr /4 , self -- res2 if (1 ), res )) {
2682
+ assert (oparg & 1 );
2680
2683
PyTypeObject * self_cls = Py_TYPE (self );
2681
2684
DEOPT_IF (self_cls -> tp_version_tag != type_version , LOAD_ATTR );
2682
2685
assert (self_cls -> tp_dictoffset == 0 );
@@ -2685,10 +2688,39 @@ dummy_func(
2685
2688
assert (_PyType_HasFeature (Py_TYPE (descr ), Py_TPFLAGS_METHOD_DESCRIPTOR ));
2686
2689
res2 = Py_NewRef (descr );
2687
2690
res = self ;
2688
- assert (oparg & 1 );
2689
2691
}
2690
2692
2691
- inst (LOAD_ATTR_METHOD_LAZY_DICT , (unused /1 , type_version /2 , unused /2 , descr /4 , self -- res2 if (oparg & 1 ), res )) {
2693
+ inst (LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES , (unused /1 , type_version /2 , keys_version /2 , descr /4 , self -- res2 if (0 ), res )) {
2694
+ assert ((oparg & 1 ) == 0 );
2695
+ PyTypeObject * self_cls = Py_TYPE (self );
2696
+ assert (type_version != 0 );
2697
+ DEOPT_IF (self_cls -> tp_version_tag != type_version , LOAD_ATTR );
2698
+ assert (self_cls -> tp_flags & Py_TPFLAGS_MANAGED_DICT );
2699
+ PyDictOrValues dorv = * _PyObject_DictOrValuesPointer (self );
2700
+ DEOPT_IF (!_PyDictOrValues_IsValues (dorv ), LOAD_ATTR );
2701
+ PyHeapTypeObject * self_heap_type = (PyHeapTypeObject * )self_cls ;
2702
+ DEOPT_IF (self_heap_type -> ht_cached_keys -> dk_version !=
2703
+ keys_version , LOAD_ATTR );
2704
+ STAT_INC (LOAD_ATTR , hit );
2705
+ assert (descr != NULL );
2706
+ DECREF_INPUTS ();
2707
+ res = Py_NewRef (descr );
2708
+ }
2709
+
2710
+ inst (LOAD_ATTR_NONDESCRIPTOR_NO_DICT , (unused /1 , type_version /2 , unused /2 , descr /4 , self -- res2 if (0 ), res )) {
2711
+ assert ((oparg & 1 ) == 0 );
2712
+ PyTypeObject * self_cls = Py_TYPE (self );
2713
+ assert (type_version != 0 );
2714
+ DEOPT_IF (self_cls -> tp_version_tag != type_version , LOAD_ATTR );
2715
+ assert (self_cls -> tp_dictoffset == 0 );
2716
+ STAT_INC (LOAD_ATTR , hit );
2717
+ assert (descr != NULL );
2718
+ DECREF_INPUTS ();
2719
+ res = Py_NewRef (descr );
2720
+ }
2721
+
2722
+ inst (LOAD_ATTR_METHOD_LAZY_DICT , (unused /1 , type_version /2 , unused /2 , descr /4 , self -- res2 if (1 ), res )) {
2723
+ assert (oparg & 1 );
2692
2724
PyTypeObject * self_cls = Py_TYPE (self );
2693
2725
DEOPT_IF (self_cls -> tp_version_tag != type_version , LOAD_ATTR );
2694
2726
Py_ssize_t dictoffset = self_cls -> tp_dictoffset ;
@@ -2701,7 +2733,6 @@ dummy_func(
2701
2733
assert (_PyType_HasFeature (Py_TYPE (descr ), Py_TPFLAGS_METHOD_DESCRIPTOR ));
2702
2734
res2 = Py_NewRef (descr );
2703
2735
res = self ;
2704
- assert (oparg & 1 );
2705
2736
}
2706
2737
2707
2738
inst (KW_NAMES , (-- )) {
0 commit comments