@@ -246,9 +246,9 @@ dummy_func(
246246 DEOPT_IF (!PyUnicode_CheckExact (left ), BINARY_OP );
247247 DEOPT_IF (Py_TYPE (right ) != Py_TYPE (left ), BINARY_OP );
248248 _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 );
252252 DEOPT_IF (* target_local != left , BINARY_OP );
253253 STAT_INC (BINARY_OP , hit );
254254 /* Handle `left = left + right` or `left += right` for str.
@@ -1748,10 +1748,10 @@ dummy_func(
17481748 Py_DECREF (left );
17491749 Py_DECREF (right );
17501750 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 ;
17551755 int err = PyObject_IsTrue (cond );
17561756 Py_DECREF (cond );
17571757 if (err < 0 ) {
@@ -1774,7 +1774,7 @@ dummy_func(
17741774 _Py_DECREF_SPECIALIZED (left , _PyFloat_ExactDealloc );
17751775 _Py_DECREF_SPECIALIZED (right , _PyFloat_ExactDealloc );
17761776 if (sign_ish & oparg ) {
1777- int offset = _Py_OPARG ( next_instr [1 ]) ;
1777+ int offset = next_instr [1 ]. op . arg ;
17781778 JUMPBY (offset );
17791779 }
17801780 }
@@ -1795,7 +1795,7 @@ dummy_func(
17951795 _Py_DECREF_SPECIALIZED (left , (destructor )PyObject_Free );
17961796 _Py_DECREF_SPECIALIZED (right , (destructor )PyObject_Free );
17971797 if (sign_ish & oparg ) {
1798- int offset = _Py_OPARG ( next_instr [1 ]) ;
1798+ int offset = next_instr [1 ]. op . arg ;
17991799 JUMPBY (offset );
18001800 }
18011801 }
@@ -1814,7 +1814,7 @@ dummy_func(
18141814 assert ((oparg & 0xf ) == COMPARISON_NOT_EQUALS || (oparg & 0xf ) == COMPARISON_EQUALS );
18151815 assert (COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS );
18161816 if ((res + COMPARISON_NOT_EQUALS ) & oparg ) {
1817- int offset = _Py_OPARG ( next_instr [1 ]) ;
1817+ int offset = next_instr [1 ]. op . arg ;
18181818 JUMPBY (offset );
18191819 }
18201820 }
@@ -2122,7 +2122,7 @@ dummy_func(
21222122 _PyErr_Clear (tstate );
21232123 }
21242124 /* 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 );
21262126 Py_DECREF (iter );
21272127 STACK_SHRINK (1 );
21282128 /* Jump forward oparg, then skip following END_FOR instruction */
@@ -2186,7 +2186,7 @@ dummy_func(
21862186 DEOPT_IF (Py_TYPE (r ) != & PyRangeIter_Type , FOR_ITER );
21872187 STAT_INC (FOR_ITER , hit );
21882188 _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 );
21902190 if (r -> len <= 0 ) {
21912191 STACK_SHRINK (1 );
21922192 Py_DECREF (r );
@@ -2197,7 +2197,7 @@ dummy_func(
21972197 long value = r -> start ;
21982198 r -> start = value + r -> step ;
21992199 r -> len -- ;
2200- if (_PyLong_AssignValue (& GETLOCAL (_Py_OPARG ( next ) ), value ) < 0 ) {
2200+ if (_PyLong_AssignValue (& GETLOCAL (next . op . arg ), value ) < 0 ) {
22012201 goto error ;
22022202 }
22032203 // The STORE_FAST is already done.
@@ -2220,7 +2220,7 @@ dummy_func(
22202220 gen -> gi_exc_state .previous_item = tstate -> exc_info ;
22212221 tstate -> exc_info = & gen -> gi_exc_state ;
22222222 JUMPBY (INLINE_CACHE_ENTRIES_FOR_ITER + oparg );
2223- assert (_Py_OPCODE ( * next_instr ) == END_FOR );
2223+ assert (next_instr -> op . code == END_FOR );
22242224 DISPATCH_INLINED (gen_frame );
22252225 }
22262226
@@ -2809,7 +2809,7 @@ dummy_func(
28092809 STACK_SHRINK (3 );
28102810 // CALL + POP_TOP
28112811 JUMPBY (INLINE_CACHE_ENTRIES_CALL + 1 );
2812- assert (_Py_OPCODE ( next_instr [-1 ]) == POP_TOP );
2812+ assert (next_instr [-1 ]. op . code == POP_TOP );
28132813 DISPATCH ();
28142814 }
28152815
@@ -3118,8 +3118,8 @@ dummy_func(
31183118 inst (EXTENDED_ARG , (-- )) {
31193119 assert (oparg );
31203120 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 ;
31233123 PRE_DISPATCH_GOTO ();
31243124 DISPATCH_GOTO ();
31253125 }
0 commit comments