@@ -70,8 +70,6 @@ dummy_func(
70
70
unsigned int oparg ,
71
71
_Py_atomic_int * const eval_breaker ,
72
72
_PyCFrame cframe ,
73
- PyObject * names ,
74
- PyObject * consts ,
75
73
_Py_CODEUNIT * next_instr ,
76
74
PyObject * * stack_pointer ,
77
75
PyObject * kwnames ,
@@ -627,7 +625,7 @@ dummy_func(
627
625
}
628
626
629
627
inst (RETURN_CONST , (-- )) {
630
- PyObject * retval = GETITEM (consts , oparg );
628
+ PyObject * retval = GETITEM (frame -> f_code -> co_consts , oparg );
631
629
Py_INCREF (retval );
632
630
assert (EMPTY ());
633
631
_PyFrame_SetStackPointer (frame , stack_pointer );
@@ -917,7 +915,7 @@ dummy_func(
917
915
}
918
916
919
917
inst (STORE_NAME , (v -- )) {
920
- PyObject * name = GETITEM (names , oparg );
918
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
921
919
PyObject * ns = LOCALS ();
922
920
int err ;
923
921
if (ns == NULL ) {
@@ -935,7 +933,7 @@ dummy_func(
935
933
}
936
934
937
935
inst (DELETE_NAME , (-- )) {
938
- PyObject * name = GETITEM (names , oparg );
936
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
939
937
PyObject * ns = LOCALS ();
940
938
int err ;
941
939
if (ns == NULL ) {
@@ -1029,7 +1027,7 @@ dummy_func(
1029
1027
#if ENABLE_SPECIALIZATION
1030
1028
if (ADAPTIVE_COUNTER_IS_ZERO (counter )) {
1031
1029
assert (cframe .use_tracing == 0 );
1032
- PyObject * name = GETITEM (names , oparg );
1030
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1033
1031
next_instr -- ;
1034
1032
_Py_Specialize_StoreAttr (owner , next_instr , name );
1035
1033
DISPATCH_SAME_OPARG ();
@@ -1040,29 +1038,29 @@ dummy_func(
1040
1038
#else
1041
1039
(void )counter ; // Unused.
1042
1040
#endif /* ENABLE_SPECIALIZATION */
1043
- PyObject * name = GETITEM (names , oparg );
1041
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1044
1042
int err = PyObject_SetAttr (owner , name , v );
1045
1043
Py_DECREF (v );
1046
1044
Py_DECREF (owner );
1047
1045
ERROR_IF (err , error );
1048
1046
}
1049
1047
1050
1048
inst (DELETE_ATTR , (owner -- )) {
1051
- PyObject * name = GETITEM (names , oparg );
1049
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1052
1050
int err = PyObject_SetAttr (owner , name , (PyObject * )NULL );
1053
1051
Py_DECREF (owner );
1054
1052
ERROR_IF (err , error );
1055
1053
}
1056
1054
1057
1055
inst (STORE_GLOBAL , (v -- )) {
1058
- PyObject * name = GETITEM (names , oparg );
1056
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1059
1057
int err = PyDict_SetItem (GLOBALS (), name , v );
1060
1058
Py_DECREF (v );
1061
1059
ERROR_IF (err , error );
1062
1060
}
1063
1061
1064
1062
inst (DELETE_GLOBAL , (-- )) {
1065
- PyObject * name = GETITEM (names , oparg );
1063
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1066
1064
int err ;
1067
1065
err = PyDict_DelItem (GLOBALS (), name );
1068
1066
// Can't use ERROR_IF here.
@@ -1076,7 +1074,7 @@ dummy_func(
1076
1074
}
1077
1075
1078
1076
inst (LOAD_NAME , ( -- v )) {
1079
- PyObject * name = GETITEM (names , oparg );
1077
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1080
1078
PyObject * locals = LOCALS ();
1081
1079
if (locals == NULL ) {
1082
1080
_PyErr_Format (tstate , PyExc_SystemError ,
@@ -1147,15 +1145,15 @@ dummy_func(
1147
1145
_PyLoadGlobalCache * cache = (_PyLoadGlobalCache * )next_instr ;
1148
1146
if (ADAPTIVE_COUNTER_IS_ZERO (cache -> counter )) {
1149
1147
assert (cframe .use_tracing == 0 );
1150
- PyObject * name = GETITEM (names , oparg >>1 );
1148
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >>1 );
1151
1149
next_instr -- ;
1152
1150
_Py_Specialize_LoadGlobal (GLOBALS (), BUILTINS (), next_instr , name );
1153
1151
DISPATCH_SAME_OPARG ();
1154
1152
}
1155
1153
STAT_INC (LOAD_GLOBAL , deferred );
1156
1154
DECREMENT_ADAPTIVE_COUNTER (cache -> counter );
1157
1155
#endif /* ENABLE_SPECIALIZATION */
1158
- PyObject * name = GETITEM (names , oparg >>1 );
1156
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >>1 );
1159
1157
if (PyDict_CheckExact (GLOBALS ())
1160
1158
&& PyDict_CheckExact (BUILTINS ()))
1161
1159
{
@@ -1509,15 +1507,15 @@ dummy_func(
1509
1507
_PyAttrCache * cache = (_PyAttrCache * )next_instr ;
1510
1508
if (ADAPTIVE_COUNTER_IS_ZERO (cache -> counter )) {
1511
1509
assert (cframe .use_tracing == 0 );
1512
- PyObject * name = GETITEM (names , oparg >>1 );
1510
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >>1 );
1513
1511
next_instr -- ;
1514
1512
_Py_Specialize_LoadAttr (owner , next_instr , name );
1515
1513
DISPATCH_SAME_OPARG ();
1516
1514
}
1517
1515
STAT_INC (LOAD_ATTR , deferred );
1518
1516
DECREMENT_ADAPTIVE_COUNTER (cache -> counter );
1519
1517
#endif /* ENABLE_SPECIALIZATION */
1520
- PyObject * name = GETITEM (names , oparg >> 1 );
1518
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >> 1 );
1521
1519
if (oparg & 1 ) {
1522
1520
/* Designed to work in tandem with CALL, pushes two values. */
1523
1521
PyObject * meth = NULL ;
@@ -1598,7 +1596,7 @@ dummy_func(
1598
1596
PyDictObject * dict = (PyDictObject * )_PyDictOrValues_GetDict (dorv );
1599
1597
DEOPT_IF (dict == NULL , LOAD_ATTR );
1600
1598
assert (PyDict_CheckExact ((PyObject * )dict ));
1601
- PyObject * name = GETITEM (names , oparg >>1 );
1599
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >>1 );
1602
1600
uint16_t hint = index ;
1603
1601
DEOPT_IF (hint >= (size_t )dict -> ma_keys -> dk_nentries , LOAD_ATTR );
1604
1602
if (DK_IS_UNICODE (dict -> ma_keys )) {
@@ -1689,7 +1687,7 @@ dummy_func(
1689
1687
DEOPT_IF (!_PyThreadState_HasStackSpace (tstate , code -> co_framesize ), LOAD_ATTR );
1690
1688
STAT_INC (LOAD_ATTR , hit );
1691
1689
1692
- PyObject * name = GETITEM (names , oparg >> 1 );
1690
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg >> 1 );
1693
1691
Py_INCREF (f );
1694
1692
_PyInterpreterFrame * new_frame = _PyFrame_PushUnchecked (tstate , f , 2 );
1695
1693
// Manipulate stack directly because we exit with DISPATCH_INLINED().
@@ -1734,7 +1732,7 @@ dummy_func(
1734
1732
PyDictObject * dict = (PyDictObject * )_PyDictOrValues_GetDict (dorv );
1735
1733
DEOPT_IF (dict == NULL , STORE_ATTR );
1736
1734
assert (PyDict_CheckExact ((PyObject * )dict ));
1737
- PyObject * name = GETITEM (names , oparg );
1735
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1738
1736
DEOPT_IF (hint >= (size_t )dict -> ma_keys -> dk_nentries , STORE_ATTR );
1739
1737
PyObject * old_value ;
1740
1738
uint64_t new_version ;
@@ -1928,14 +1926,14 @@ dummy_func(
1928
1926
}
1929
1927
1930
1928
inst (IMPORT_NAME , (level , fromlist -- res )) {
1931
- PyObject * name = GETITEM (names , oparg );
1929
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1932
1930
res = import_name (tstate , frame , name , fromlist , level );
1933
1931
DECREF_INPUTS ();
1934
1932
ERROR_IF (res == NULL , error );
1935
1933
}
1936
1934
1937
1935
inst (IMPORT_FROM , (from -- from , res )) {
1938
- PyObject * name = GETITEM (names , oparg );
1936
+ PyObject * name = GETITEM (frame -> f_code -> co_names , oparg );
1939
1937
res = import_from (tstate , from , name );
1940
1938
ERROR_IF (res == NULL , error );
1941
1939
}
@@ -2588,8 +2586,8 @@ dummy_func(
2588
2586
2589
2587
inst (KW_NAMES , (-- )) {
2590
2588
assert (kwnames == NULL );
2591
- assert (oparg < PyTuple_GET_SIZE (consts ));
2592
- kwnames = GETITEM (consts , oparg );
2589
+ assert (oparg < PyTuple_GET_SIZE (frame -> f_code -> co_consts ));
2590
+ kwnames = GETITEM (frame -> f_code -> co_consts , oparg );
2593
2591
}
2594
2592
2595
2593
// Cache layout: counter/1, func_version/2, min_args/1
0 commit comments