@@ -85,7 +85,8 @@ static PyObject *list, *tuple, *dict, *owner;
85
85
static PyObject * exit_func , * lasti , * val ;
86
86
static size_t jump ;
87
87
// Dummy variables for cache effects
88
- static _Py_CODEUNIT when_to_jump_mask , invert , counter ;
88
+ static _Py_CODEUNIT when_to_jump_mask , invert , counter , index ;
89
+ static uint32_t type_version ;
89
90
// Dummy opcode names for 'op' opcodes
90
91
#define _BINARY_OP_INPLACE_ADD_UNICODE_PART_1 1001
91
92
#define _BINARY_OP_INPLACE_ADD_UNICODE_PART_2 1002
@@ -1944,22 +1945,15 @@ dummy_func(
1944
1945
DISPATCH_INLINED (new_frame );
1945
1946
}
1946
1947
1947
- // stack effect: (__0, __1 -- )
1948
- inst (STORE_ATTR_INSTANCE_VALUE ) {
1948
+ inst (STORE_ATTR_INSTANCE_VALUE , (unused /1 , type_version /2 , index /1 , value , owner -- )) {
1949
1949
assert (cframe .use_tracing == 0 );
1950
- PyObject * owner = TOP ();
1951
1950
PyTypeObject * tp = Py_TYPE (owner );
1952
- _PyAttrCache * cache = (_PyAttrCache * )next_instr ;
1953
- uint32_t type_version = read_u32 (cache -> version );
1954
1951
assert (type_version != 0 );
1955
1952
DEOPT_IF (tp -> tp_version_tag != type_version , STORE_ATTR );
1956
1953
assert (tp -> tp_flags & Py_TPFLAGS_MANAGED_DICT );
1957
1954
PyDictOrValues dorv = * _PyObject_DictOrValuesPointer (owner );
1958
1955
DEOPT_IF (!_PyDictOrValues_IsValues (dorv ), STORE_ATTR );
1959
1956
STAT_INC (STORE_ATTR , hit );
1960
- Py_ssize_t index = cache -> index ;
1961
- STACK_SHRINK (1 );
1962
- PyObject * value = POP ();
1963
1957
PyDictValues * values = _PyDictOrValues_GetValues (dorv );
1964
1958
PyObject * old_value = values -> values [index ];
1965
1959
values -> values [index ] = value ;
@@ -1970,7 +1964,6 @@ dummy_func(
1970
1964
Py_DECREF (old_value );
1971
1965
}
1972
1966
Py_DECREF (owner );
1973
- JUMPBY (INLINE_CACHE_ENTRIES_STORE_ATTR );
1974
1967
}
1975
1968
1976
1969
// stack effect: (__0, __1 -- )
0 commit comments