@@ -6640,7 +6640,7 @@ static void zend_jit_dump_exit_info(zend_jit_trace_info *t)
6640
6640
if (t -> exit_info [i ].flags & ZEND_JIT_EXIT_RESTORE_CALL ) {
6641
6641
fprintf (stderr , "/CALL" );
6642
6642
}
6643
- if (t -> exit_info [i ].flags & (ZEND_JIT_EXIT_POLYMORPHISM |ZEND_JIT_EXIT_DYNAMIC_CALL )) {
6643
+ if (t -> exit_info [i ].flags & (ZEND_JIT_EXIT_POLYMORPHISM |ZEND_JIT_EXIT_METHOD_CALL | ZEND_JIT_EXIT_CLOSURE_CALL )) {
6644
6644
fprintf (stderr , "/POLY" );
6645
6645
}
6646
6646
if (t -> exit_info [i ].flags & ZEND_JIT_EXIT_FREE_OP1 ) {
@@ -7043,12 +7043,12 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3
7043
7043
}
7044
7044
7045
7045
if (JIT_G (max_polymorphic_calls ) > 0 ) {
7046
- if ((zend_jit_traces [parent_num ].exit_info [exit_num ].flags & ZEND_JIT_EXIT_DYNAMIC_CALL )
7046
+ if ((zend_jit_traces [parent_num ].exit_info [exit_num ].flags & ( ZEND_JIT_EXIT_METHOD_CALL | ZEND_JIT_EXIT_CLOSURE_CALL ) )
7047
7047
|| ((zend_jit_traces [parent_num ].exit_info [exit_num ].flags & ZEND_JIT_EXIT_POLYMORPHISM )
7048
7048
&& EX (call ))) {
7049
7049
if (zend_jit_traces [parent_num ].polymorphism >= JIT_G (max_polymorphic_calls ) - 1 ) {
7050
7050
is_megamorphic = zend_jit_traces [parent_num ].exit_info [exit_num ].flags &
7051
- (ZEND_JIT_EXIT_DYNAMIC_CALL | ZEND_JIT_EXIT_POLYMORPHISM );
7051
+ (ZEND_JIT_EXIT_METHOD_CALL | ZEND_JIT_EXIT_CLOSURE_CALL | ZEND_JIT_EXIT_POLYMORPHISM );
7052
7052
} else if (!zend_jit_traces [parent_num ].polymorphism ) {
7053
7053
polymorphism = 1 ;
7054
7054
} else if (exit_num == 0 ) {
@@ -7249,6 +7249,16 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf
7249
7249
return 1 ;
7250
7250
}
7251
7251
}
7252
+ if (t -> exit_info [exit_num ].flags & ZEND_JIT_EXIT_METHOD_CALL ) {
7253
+ zend_function * func = (zend_function * )regs -> r [0 ];
7254
+
7255
+ if (UNEXPECTED (func -> common .fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE )) {
7256
+ zend_string_release_ex (func -> common .function_name , 0 );
7257
+ zend_free_trampoline (func );
7258
+ EX (opline ) = opline ;
7259
+ return 1 ;
7260
+ }
7261
+ }
7252
7262
7253
7263
/* Set VM opline to continue interpretation */
7254
7264
EX (opline ) = opline ;
0 commit comments