@@ -2970,13 +2970,6 @@ dummy_func(
29702970 if (!IS_JIT_TRACING () && backoff_counter_triggers (counter ) &&
29712971 this_instr -> op .code == JUMP_BACKWARD_JIT &&
29722972 next_instr -> op .code != ENTER_EXECUTOR ) {
2973- if (tstate -> interp -> jit_state .code_buffer == NULL ) {
2974- tstate -> interp -> jit_state .code_buffer = (_PyUOpInstruction * )_PyObject_VirtualAlloc (UOP_BUFFER_SIZE );
2975- if (tstate -> interp -> jit_state .code_buffer == NULL ) {
2976- // Don't error, just go to next instruction.
2977- DISPATCH ();
2978- }
2979- }
29802973 /* Back up over EXTENDED_ARGs so executor is inserted at the correct place */
29812974 _Py_CODEUNIT * insert_exec_at = this_instr ;
29822975 while (oparg > 255 ) {
@@ -5673,24 +5666,25 @@ dummy_func(
56735666 }
56745667 // Super instructions. Instruction deopted. There's a mismatch in what the stack expects
56755668 // in the optimizer. So we have to reflect in the trace correctly.
5676- if ((tstate -> interp -> jit_state .prev_state .instr -> op .code == CALL_LIST_APPEND &&
5669+ _PyThreadStateImpl * _tstate = (_PyThreadStateImpl * )tstate ;
5670+ if ((_tstate -> jit_state .prev_state .instr -> op .code == CALL_LIST_APPEND &&
56775671 opcode == POP_TOP ) ||
5678- (tstate -> interp -> jit_state .prev_state .instr -> op .code == BINARY_OP_INPLACE_ADD_UNICODE &&
5672+ (_tstate -> jit_state .prev_state .instr -> op .code == BINARY_OP_INPLACE_ADD_UNICODE &&
56795673 opcode == STORE_FAST )) {
5680- tstate -> interp -> jit_state .prev_state .instr_is_super = true;
5674+ _tstate -> jit_state .prev_state .instr_is_super = true;
56815675 }
56825676 else {
5683- tstate -> interp -> jit_state .prev_state .instr = next_instr ;
5677+ _tstate -> jit_state .prev_state .instr = next_instr ;
56845678 }
5685- tstate -> interp -> jit_state .prev_state .specialize_counter = 0 ;
5679+ _tstate -> jit_state .prev_state .specialize_counter = 0 ;
56865680 PyCodeObject * prev_code = (PyCodeObject * )Py_NewRef (PyStackRef_AsPyObjectBorrow (frame -> f_executable ));
5687- if (tstate -> interp -> jit_state .prev_state .instr_code != prev_code ) {
5688- Py_SETREF (tstate -> interp -> jit_state .prev_state .instr_code , prev_code );
5681+ if (_tstate -> jit_state .prev_state .instr_code != prev_code ) {
5682+ Py_SETREF (_tstate -> jit_state .prev_state .instr_code , prev_code );
56895683 }
56905684
5691- tstate -> interp -> jit_state .prev_state .instr_frame = frame ;
5692- tstate -> interp -> jit_state .prev_state .instr_oparg = oparg ;
5693- tstate -> interp -> jit_state .prev_state .instr_stacklevel = PyStackRef_IsNone (frame -> f_executable ) ? 2 : STACK_LEVEL ();
5685+ _tstate -> jit_state .prev_state .instr_frame = frame ;
5686+ _tstate -> jit_state .prev_state .instr_oparg = oparg ;
5687+ _tstate -> jit_state .prev_state .instr_stacklevel = PyStackRef_IsNone (frame -> f_executable ) ? 2 : STACK_LEVEL ();
56945688 DISPATCH_GOTO_NON_TRACING ();
56955689#else
56965690 Py_FatalError ("JIT label executed in non-jit build." );
0 commit comments