@@ -6047,7 +6047,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6047
6047
case ZEND_INIT_METHOD_CALL :
6048
6048
if (opline -> op2_type != IS_CONST
6049
6049
|| Z_TYPE_P (RT_CONSTANT (opline , opline -> op2 )) != IS_STRING ) {
6050
- goto generic_dynamic_call ;
6050
+ break ;
6051
6051
}
6052
6052
on_this = delayed_fetch_this = 0 ;
6053
6053
ce = NULL ;
@@ -6111,7 +6111,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6111
6111
goto done ;
6112
6112
case ZEND_INIT_DYNAMIC_CALL :
6113
6113
if (orig_op2_type != IS_OBJECT || op2_ce != zend_ce_closure ) {
6114
- goto generic_dynamic_call ;
6114
+ break ;
6115
6115
}
6116
6116
op2_info = OP2_INFO ();
6117
6117
CHECK_OP2_TRACE_TYPE ();
@@ -6120,46 +6120,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6120
6120
goto jit_failure ;
6121
6121
}
6122
6122
goto done ;
6123
- case ZEND_INIT_STATIC_METHOD_CALL :
6124
- generic_dynamic_call :
6125
- if (!zend_jit_trace_handler (& dasm_state , op_array , opline , zend_may_throw (opline , ssa_op , op_array , ssa ), p + 1 )) {
6126
- goto jit_failure ;
6127
- }
6128
- if ((p + 1 )-> op == ZEND_JIT_TRACE_INIT_CALL && (p + 1 )-> func
6129
- && (opline -> opcode != ZEND_INIT_STATIC_METHOD_CALL
6130
- || opline -> op1_type != IS_CONST
6131
- || opline -> op2_type != IS_CONST
6132
- || zend_jit_may_be_modified ((p + 1 )-> func , op_array ))) {
6133
- if (!zend_jit_init_fcall_guard (& dasm_state , 0 , (p + 1 )-> func , opline + 1 )) {
6134
- goto jit_failure ;
6135
- }
6136
- }
6137
- goto done ;
6138
- case ZEND_INIT_USER_CALL :
6139
- if (!zend_jit_trace_handler (& dasm_state , op_array , opline , zend_may_throw (opline , ssa_op , op_array , ssa ), p + 1 )) {
6140
- goto jit_failure ;
6141
- }
6142
- if ((p + 1 )-> op == ZEND_JIT_TRACE_INIT_CALL && (p + 1 )-> func
6143
- && (opline -> op2_type != IS_CONST
6144
- || zend_jit_may_be_modified ((p + 1 )-> func , op_array ))) {
6145
- if (!zend_jit_init_fcall_guard (& dasm_state , 0 , (p + 1 )-> func , opline + 1 )) {
6146
- goto jit_failure ;
6147
- }
6148
- }
6149
- goto done ;
6150
- case ZEND_NEW :
6151
- if (!zend_jit_trace_handler (& dasm_state , op_array , opline , zend_may_throw (opline , ssa_op , op_array , ssa ), p + 1 )) {
6152
- goto jit_failure ;
6153
- }
6154
- if ((p + 1 )-> op == ZEND_JIT_TRACE_INIT_CALL && (p + 1 )-> func
6155
- && (opline -> op1_type != IS_CONST
6156
- || zend_jit_may_be_modified ((p + 1 )-> func , op_array ))) {
6157
- SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ), IS_OBJECT , 1 );
6158
- if (!zend_jit_init_fcall_guard (& dasm_state , 0 , (p + 1 )-> func , opline + 1 )) {
6159
- goto jit_failure ;
6160
- }
6161
- }
6162
- goto done ;
6163
6123
case ZEND_SEND_ARRAY :
6164
6124
case ZEND_SEND_UNPACK :
6165
6125
if (JIT_G (current_frame )
@@ -6198,6 +6158,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6198
6158
zend_may_throw_ex (opline , ssa_op , op_array , ssa , op1_info , op2_info ), p + 1 )) {
6199
6159
goto jit_failure ;
6200
6160
}
6161
+ if ((p + 1 )-> op == ZEND_JIT_TRACE_INIT_CALL && (p + 1 )-> func ) {
6162
+ if (zend_jit_may_be_polymorphic_call (opline ) ||
6163
+ zend_jit_may_be_modified ((p + 1 )-> func , op_array )) {
6164
+ if (!zend_jit_init_fcall_guard (& dasm_state , 0 , (p + 1 )-> func , opline + 1 )) {
6165
+ goto jit_failure ;
6166
+ }
6167
+ }
6168
+ }
6201
6169
}
6202
6170
6203
6171
done :
0 commit comments