@@ -246,9 +246,9 @@ dummy_func(
246
246
DEOPT_IF (!PyUnicode_CheckExact (left ), BINARY_OP );
247
247
DEOPT_IF (Py_TYPE (right ) != Py_TYPE (left ), BINARY_OP );
248
248
_Py_CODEUNIT true_next = next_instr [INLINE_CACHE_ENTRIES_BINARY_OP ];
249
- assert (_Py_OPCODE ( true_next ) == STORE_FAST ||
250
- _Py_OPCODE ( true_next ) == STORE_FAST__LOAD_FAST );
251
- PyObject * * target_local = & GETLOCAL (_Py_OPARG ( true_next ) );
249
+ assert (true_next . op . code == STORE_FAST ||
250
+ true_next . op . code == STORE_FAST__LOAD_FAST );
251
+ PyObject * * target_local = & GETLOCAL (true_next . op . arg );
252
252
DEOPT_IF (* target_local != left , BINARY_OP );
253
253
STAT_INC (BINARY_OP , hit );
254
254
/* Handle `left = left + right` or `left += right` for str.
@@ -1748,10 +1748,10 @@ dummy_func(
1748
1748
Py_DECREF (left );
1749
1749
Py_DECREF (right );
1750
1750
ERROR_IF (cond == NULL , error );
1751
- assert (_Py_OPCODE ( next_instr [1 ]) == POP_JUMP_IF_FALSE ||
1752
- _Py_OPCODE ( next_instr [1 ]) == POP_JUMP_IF_TRUE );
1753
- bool jump_on_true = _Py_OPCODE ( next_instr [1 ]) == POP_JUMP_IF_TRUE ;
1754
- int offset = _Py_OPARG ( next_instr [1 ]) ;
1751
+ assert (next_instr [1 ]. op . code == POP_JUMP_IF_FALSE ||
1752
+ next_instr [1 ]. op . code == POP_JUMP_IF_TRUE );
1753
+ bool jump_on_true = next_instr [1 ]. op . code == POP_JUMP_IF_TRUE ;
1754
+ int offset = next_instr [1 ]. op . arg ;
1755
1755
int err = PyObject_IsTrue (cond );
1756
1756
Py_DECREF (cond );
1757
1757
if (err < 0 ) {
@@ -1774,7 +1774,7 @@ dummy_func(
1774
1774
_Py_DECREF_SPECIALIZED (left , _PyFloat_ExactDealloc );
1775
1775
_Py_DECREF_SPECIALIZED (right , _PyFloat_ExactDealloc );
1776
1776
if (sign_ish & oparg ) {
1777
- int offset = _Py_OPARG ( next_instr [1 ]) ;
1777
+ int offset = next_instr [1 ]. op . arg ;
1778
1778
JUMPBY (offset );
1779
1779
}
1780
1780
}
@@ -1795,7 +1795,7 @@ dummy_func(
1795
1795
_Py_DECREF_SPECIALIZED (left , (destructor )PyObject_Free );
1796
1796
_Py_DECREF_SPECIALIZED (right , (destructor )PyObject_Free );
1797
1797
if (sign_ish & oparg ) {
1798
- int offset = _Py_OPARG ( next_instr [1 ]) ;
1798
+ int offset = next_instr [1 ]. op . arg ;
1799
1799
JUMPBY (offset );
1800
1800
}
1801
1801
}
@@ -1814,7 +1814,7 @@ dummy_func(
1814
1814
assert ((oparg & 0xf ) == COMPARISON_NOT_EQUALS || (oparg & 0xf ) == COMPARISON_EQUALS );
1815
1815
assert (COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS );
1816
1816
if ((res + COMPARISON_NOT_EQUALS ) & oparg ) {
1817
- int offset = _Py_OPARG ( next_instr [1 ]) ;
1817
+ int offset = next_instr [1 ]. op . arg ;
1818
1818
JUMPBY (offset );
1819
1819
}
1820
1820
}
@@ -2122,7 +2122,7 @@ dummy_func(
2122
2122
_PyErr_Clear (tstate );
2123
2123
}
2124
2124
/* iterator ended normally */
2125
- assert (_Py_OPCODE ( next_instr [INLINE_CACHE_ENTRIES_FOR_ITER + oparg ]) == END_FOR );
2125
+ assert (next_instr [INLINE_CACHE_ENTRIES_FOR_ITER + oparg ]. op . code == END_FOR );
2126
2126
Py_DECREF (iter );
2127
2127
STACK_SHRINK (1 );
2128
2128
/* Jump forward oparg, then skip following END_FOR instruction */
@@ -2186,7 +2186,7 @@ dummy_func(
2186
2186
DEOPT_IF (Py_TYPE (r ) != & PyRangeIter_Type , FOR_ITER );
2187
2187
STAT_INC (FOR_ITER , hit );
2188
2188
_Py_CODEUNIT next = next_instr [INLINE_CACHE_ENTRIES_FOR_ITER ];
2189
- assert (_PyOpcode_Deopt [_Py_OPCODE ( next ) ] == STORE_FAST );
2189
+ assert (_PyOpcode_Deopt [next . op . code ] == STORE_FAST );
2190
2190
if (r -> len <= 0 ) {
2191
2191
STACK_SHRINK (1 );
2192
2192
Py_DECREF (r );
@@ -2197,7 +2197,7 @@ dummy_func(
2197
2197
long value = r -> start ;
2198
2198
r -> start = value + r -> step ;
2199
2199
r -> len -- ;
2200
- if (_PyLong_AssignValue (& GETLOCAL (_Py_OPARG ( next ) ), value ) < 0 ) {
2200
+ if (_PyLong_AssignValue (& GETLOCAL (next . op . arg ), value ) < 0 ) {
2201
2201
goto error ;
2202
2202
}
2203
2203
// The STORE_FAST is already done.
@@ -2220,7 +2220,7 @@ dummy_func(
2220
2220
gen -> gi_exc_state .previous_item = tstate -> exc_info ;
2221
2221
tstate -> exc_info = & gen -> gi_exc_state ;
2222
2222
JUMPBY (INLINE_CACHE_ENTRIES_FOR_ITER + oparg );
2223
- assert (_Py_OPCODE ( * next_instr ) == END_FOR );
2223
+ assert (next_instr -> op . code == END_FOR );
2224
2224
DISPATCH_INLINED (gen_frame );
2225
2225
}
2226
2226
@@ -2809,7 +2809,7 @@ dummy_func(
2809
2809
STACK_SHRINK (3 );
2810
2810
// CALL + POP_TOP
2811
2811
JUMPBY (INLINE_CACHE_ENTRIES_CALL + 1 );
2812
- assert (_Py_OPCODE ( next_instr [-1 ]) == POP_TOP );
2812
+ assert (next_instr [-1 ]. op . code == POP_TOP );
2813
2813
DISPATCH ();
2814
2814
}
2815
2815
@@ -3118,8 +3118,8 @@ dummy_func(
3118
3118
inst (EXTENDED_ARG , (-- )) {
3119
3119
assert (oparg );
3120
3120
assert (cframe .use_tracing == 0 );
3121
- opcode = _Py_OPCODE ( * next_instr ) ;
3122
- oparg = oparg << 8 | _Py_OPARG ( * next_instr ) ;
3121
+ opcode = next_instr -> op . code ;
3122
+ oparg = oparg << 8 | next_instr -> op . arg ;
3123
3123
PRE_DISPATCH_GOTO ();
3124
3124
DISPATCH_GOTO ();
3125
3125
}
0 commit comments