@@ -3458,33 +3458,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
3458
3458
}
3459
3459
}
3460
3460
3461
- TARGET (LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE ) {
3462
- assert (cframe .use_tracing == 0 );
3463
- PyObject * owner = GETLOCAL (oparg ); // borrowed
3464
- if (owner == NULL ) {
3465
- goto unbound_local_error ;
3466
- }
3467
- // GET_CACHE(), but for the following opcode
3468
- assert (_Py_OPCODE (* next_instr ) == LOAD_ATTR_INSTANCE_VALUE );
3469
- _PyAttrCache * cache = (_PyAttrCache * )(next_instr + 1 );
3470
- uint32_t type_version = read_u32 (cache -> version );
3471
- assert (type_version != 0 );
3472
- PyTypeObject * tp = Py_TYPE (owner );
3473
- // These DEOPT_IF miss branches do PUSH(Py_NewRef(owner)).
3474
- DEOPT_IF (tp -> tp_version_tag != type_version ,
3475
- LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE );
3476
- assert (tp -> tp_dictoffset < 0 );
3477
- assert (tp -> tp_flags & Py_TPFLAGS_MANAGED_DICT );
3478
- PyDictValues * values = * _PyObject_ValuesPointer (owner );
3479
- DEOPT_IF (values == NULL , LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE );
3480
- PyObject * res = values -> values [cache -> index ];
3481
- DEOPT_IF (res == NULL , LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE );
3482
- STAT_INC (LOAD_ATTR , hit );
3483
- PUSH (Py_NewRef (res ));
3484
- JUMPBY (INLINE_CACHE_ENTRIES_LOAD_ATTR + 1 );
3485
- NOTRACE_DISPATCH ();
3486
- }
3487
-
3488
3461
TARGET (LOAD_ATTR_INSTANCE_VALUE ) {
3489
3462
assert (cframe .use_tracing == 0 );
3490
3463
PyObject * owner = TOP ();
@@ -3493,14 +3466,13 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
3493
3466
_PyAttrCache * cache = (_PyAttrCache * )next_instr ;
3494
3467
uint32_t type_version = read_u32 (cache -> version );
3495
3468
assert (type_version != 0 );
3496
- DEOPT_IF (tp -> tp_version_tag != type_version ,
3497
- LOAD_ATTR_INSTANCE_VALUE );
3469
+ DEOPT_IF (tp -> tp_version_tag != type_version , LOAD_ATTR );
3498
3470
assert (tp -> tp_dictoffset < 0 );
3499
3471
assert (tp -> tp_flags & Py_TPFLAGS_MANAGED_DICT );
3500
3472
PyDictValues * values = * _PyObject_ValuesPointer (owner );
3501
- DEOPT_IF (values == NULL , LOAD_ATTR_INSTANCE_VALUE );
3473
+ DEOPT_IF (values == NULL , LOAD_ATTR );
3502
3474
res = values -> values [cache -> index ];
3503
- DEOPT_IF (res == NULL , LOAD_ATTR_INSTANCE_VALUE );
3475
+ DEOPT_IF (res == NULL , LOAD_ATTR );
3504
3476
STAT_INC (LOAD_ATTR , hit );
3505
3477
Py_INCREF (res );
3506
3478
SET_TOP (res );
@@ -5640,51 +5612,6 @@ MISS_WITH_INLINE_CACHE(BINARY_SUBSCR)
5640
5612
MISS_WITH_INLINE_CACHE (UNPACK_SEQUENCE )
5641
5613
MISS_WITH_OPARG_COUNTER (STORE_SUBSCR )
5642
5614
5643
- LOAD_ATTR_INSTANCE_VALUE_miss :
5644
- {
5645
- // Special-cased so that if LOAD_ATTR_INSTANCE_VALUE
5646
- // gets replaced, then any preceeding
5647
- // LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE gets replaced as well
5648
- STAT_INC (LOAD_ATTR_INSTANCE_VALUE , miss );
5649
- STAT_INC (LOAD_ATTR , miss );
5650
- _PyAttrCache * cache = (_PyAttrCache * )next_instr ;
5651
- cache -> counter -- ;
5652
- if (cache -> counter == 0 ) {
5653
- next_instr [-1 ] = _Py_MAKECODEUNIT (LOAD_ATTR_ADAPTIVE , oparg );
5654
- if (_Py_OPCODE (next_instr [-2 ]) == LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE ) {
5655
- next_instr [-2 ] = _Py_MAKECODEUNIT (LOAD_FAST , _Py_OPARG (next_instr [-2 ]));
5656
- if (_Py_OPCODE (next_instr [-3 ]) == LOAD_FAST ) {
5657
- next_instr [-3 ] = _Py_MAKECODEUNIT (LOAD_FAST__LOAD_FAST , _Py_OPARG (next_instr [-3 ]));
5658
- }
5659
- }
5660
- STAT_INC (LOAD_ATTR , deopt );
5661
- cache -> counter = ADAPTIVE_CACHE_BACKOFF ;
5662
- }
5663
- JUMP_TO_INSTRUCTION (LOAD_ATTR );
5664
- }
5665
-
5666
- LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE_miss :
5667
- {
5668
- // This is special-cased because we have a superinstruction
5669
- // that includes a specialized instruction.
5670
- // If the specialized portion misses, carry out
5671
- // the first instruction, then perform a miss
5672
- // for the second instruction as usual.
5673
-
5674
- // Do LOAD_FAST
5675
- {
5676
- PyObject * value = GETLOCAL (oparg );
5677
- assert (value != NULL ); // Already checked if unbound
5678
- Py_INCREF (value );
5679
- PUSH (value );
5680
- NEXTOPARG ();
5681
- next_instr ++ ;
5682
- }
5683
-
5684
- // Now we are in the correct state for LOAD_ATTR
5685
- goto LOAD_ATTR_INSTANCE_VALUE_miss ;
5686
- }
5687
-
5688
5615
binary_subscr_dict_error :
5689
5616
{
5690
5617
PyObject * sub = POP ();
0 commit comments