@@ -6976,6 +6976,7 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
69766976 const zend_op * orig_opline = EX (opline );
69776977 const zend_op * opline ;
69786978 zend_jit_trace_info * t = & zend_jit_traces [trace_num ];
6979+ int repeat_last_opline = 0 ;
69796980
69806981 /* Deoptimizatoion of VM stack state */
69816982 uint32_t i ;
@@ -7030,19 +7031,7 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
70307031
70317032 if (UNEXPECTED (Z_TYPE_P (val ) == IS_UNDEF )) {
70327033 /* Undefined array index or property */
7033- if (JIT_G (debug ) & ZEND_JIT_DEBUG_TRACE_EXIT ) {
7034- fprintf (stderr , " TRACE %d exit %d %s%s%s() %s:%d\n" ,
7035- trace_num ,
7036- exit_num ,
7037- EX (func )-> op_array .scope ? ZSTR_VAL (EX (func )-> op_array .scope -> name ) : "" ,
7038- EX (func )-> op_array .scope ? "::" : "" ,
7039- EX (func )-> op_array .function_name ?
7040- ZSTR_VAL (EX (func )-> op_array .function_name ) : "$main" ,
7041- ZSTR_VAL (EX (func )-> op_array .filename ),
7042- EX (opline )-> lineno );
7043- }
7044- EX (opline ) = t -> exit_info [exit_num ].opline - 1 ;
7045- return 0 ;
7034+ repeat_last_opline = 1 ;
70467035 } else {
70477036 ZVAL_COPY (EX_VAR_NUM (i ), val );
70487037 }
@@ -7106,6 +7095,11 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
71067095 EX (opline )-> lineno );
71077096 }
71087097
7098+ if (repeat_last_opline ) {
7099+ EX (opline ) = t -> exit_info [exit_num ].opline - 1 ;
7100+ return (EX (opline ) == t -> opline );
7101+ }
7102+
71097103 if (t -> exit_info [exit_num ].flags & ZEND_JIT_EXIT_TO_VM ) {
71107104 if (zend_jit_trace_exit_is_bad (trace_num , exit_num )) {
71117105 zend_jit_blacklist_trace_exit (trace_num , exit_num );
0 commit comments