@@ -616,7 +616,7 @@ _PyJit_translate_single_bytecode_to_trace(
616616
617617 bool needs_guard_ip = OPCODE_HAS_NEEDS_GUARD_IP (opcode );
618618 if (has_dynamic_jump_taken && !needs_guard_ip ) {
619- DPRINTF (2 , "Unsupported: dynamic jump taken\n" );
619+ DPRINTF (2 , "Unsupported: dynamic jump taken %s \n" , _PyOpcode_OpName [ opcode ] );
620620 goto unsupported ;
621621 }
622622 DPRINTF (2 , "%p %d: %s(%d) %d %d\n" , old_code , target , _PyOpcode_OpName [opcode ], oparg , needs_guard_ip , old_stack_level );
@@ -749,6 +749,8 @@ _PyJit_translate_single_bytecode_to_trace(
749749 if ((next_instr != _tstate -> jit_state .initial_state .close_loop_instr ) &&
750750 (next_instr != _tstate -> jit_state .initial_state .start_instr ) &&
751751 _tstate -> jit_state .prev_state .code_curr_size > 5 &&
752+ // For side exits, we don't want to terminate them early.
753+ _tstate -> jit_state .initial_state .exit == NULL &&
752754 // These are coroutines, and we want to unroll those usually.
753755 opcode != JUMP_BACKWARD_NO_INTERRUPT ) {
754756 // We encountered a JUMP_BACKWARD but not to the top of our own loop.
@@ -867,7 +869,7 @@ _PyJit_translate_single_bytecode_to_trace(
867869 if (frame -> owner < FRAME_OWNED_BY_INTERPRETER ) {
868870 // Don't add nested code objects to the dependency.
869871 // It causes endless re-traces.
870- if (new_func != NULL && !(new_code -> co_flags & CO_NESTED )) {
872+ if (new_func != NULL && !Py_IsNone (( PyObject * ) new_func ) && ! (new_code -> co_flags & CO_NESTED )) {
871873 operand = (uintptr_t )new_func ;
872874 DPRINTF (2 , "Adding %p func to op\n" , (void * )operand );
873875 _Py_BloomFilter_Add (dependencies , new_func );
0 commit comments