@@ -489,31 +489,32 @@ dummy_func(
489
489
PREDICT (JUMP_BACKWARD );
490
490
}
491
491
492
- inst (STORE_SUBSCR , (v , container , sub -- )) {
493
- _PyStoreSubscrCache * cache = (_PyStoreSubscrCache * )next_instr ;
494
- if (ADAPTIVE_COUNTER_IS_ZERO (cache -> counter )) {
492
+ family (store_subscr ) = {
493
+ STORE_SUBSCR ,
494
+ STORE_SUBSCR_DICT ,
495
+ STORE_SUBSCR_LIST_INT ,
496
+ };
497
+
498
+ inst (STORE_SUBSCR , (counter /1 , v , container , sub -- )) {
499
+ if (ADAPTIVE_COUNTER_IS_ZERO (counter )) {
495
500
assert (cframe .use_tracing == 0 );
496
501
next_instr -- ;
497
502
_Py_Specialize_StoreSubscr (container , sub , next_instr );
498
503
DISPATCH_SAME_OPARG ();
499
504
}
500
505
STAT_INC (STORE_SUBSCR , deferred );
506
+ _PyStoreSubscrCache * cache = (_PyStoreSubscrCache * )next_instr ;
501
507
DECREMENT_ADAPTIVE_COUNTER (cache -> counter );
502
508
/* container[sub] = v */
503
509
int err = PyObject_SetItem (container , sub , v );
504
510
Py_DECREF (v );
505
511
Py_DECREF (container );
506
512
Py_DECREF (sub );
507
513
ERROR_IF (err != 0 , error );
508
- JUMPBY (INLINE_CACHE_ENTRIES_STORE_SUBSCR );
509
514
}
510
515
511
- // stack effect: (__0, __1, __2 -- )
512
- inst (STORE_SUBSCR_LIST_INT ) {
516
+ inst (STORE_SUBSCR_LIST_INT , (unused /1 , value , list , sub -- )) {
513
517
assert (cframe .use_tracing == 0 );
514
- PyObject * sub = TOP ();
515
- PyObject * list = SECOND ();
516
- PyObject * value = THIRD ();
517
518
DEOPT_IF (!PyLong_CheckExact (sub ), STORE_SUBSCR );
518
519
DEOPT_IF (!PyList_CheckExact (list ), STORE_SUBSCR );
519
520
@@ -526,29 +527,19 @@ dummy_func(
526
527
527
528
PyObject * old_value = PyList_GET_ITEM (list , index );
528
529
PyList_SET_ITEM (list , index , value );
529
- STACK_SHRINK (3 );
530
530
assert (old_value != NULL );
531
531
Py_DECREF (old_value );
532
532
_Py_DECREF_SPECIALIZED (sub , (destructor )PyObject_Free );
533
533
Py_DECREF (list );
534
- JUMPBY (INLINE_CACHE_ENTRIES_STORE_SUBSCR );
535
534
}
536
535
537
- // stack effect: (__0, __1, __2 -- )
538
- inst (STORE_SUBSCR_DICT ) {
536
+ inst (STORE_SUBSCR_DICT , (unused /1 , value , dict , sub -- )) {
539
537
assert (cframe .use_tracing == 0 );
540
- PyObject * sub = TOP ();
541
- PyObject * dict = SECOND ();
542
- PyObject * value = THIRD ();
543
538
DEOPT_IF (!PyDict_CheckExact (dict ), STORE_SUBSCR );
544
- STACK_SHRINK (3 );
545
539
STAT_INC (STORE_SUBSCR , hit );
546
540
int err = _PyDict_SetItem_Take2 ((PyDictObject * )dict , sub , value );
547
541
Py_DECREF (dict );
548
- if (err != 0 ) {
549
- goto error ;
550
- }
551
- JUMPBY (INLINE_CACHE_ENTRIES_STORE_SUBSCR );
542
+ ERROR_IF (err != 0 , error );
552
543
}
553
544
554
545
// stack effect: (__0, __1 -- )
@@ -3655,9 +3646,6 @@ family(load_global) = {
3655
3646
LOAD_GLOBAL , LOAD_GLOBAL_BUILTIN ,
3656
3647
LOAD_GLOBAL_MODULE };
3657
3648
family (store_fast ) = { STORE_FAST , STORE_FAST__LOAD_FAST , STORE_FAST__STORE_FAST };
3658
- family (store_subscr ) = {
3659
- STORE_SUBSCR , STORE_SUBSCR_DICT ,
3660
- STORE_SUBSCR_LIST_INT };
3661
3649
family (unpack_sequence ) = {
3662
3650
UNPACK_SEQUENCE , UNPACK_SEQUENCE_LIST ,
3663
3651
UNPACK_SEQUENCE_TUPLE , UNPACK_SEQUENCE_TWO_TUPLE };
0 commit comments