@@ -3966,6 +3966,33 @@ static bool zend_jit_trace_must_store_type(const zend_op_array *op_array,
3966
3966
return 1 ;
3967
3967
}
3968
3968
3969
+ static bool zend_jit_trace_may_throw (const zend_op * opline ,
3970
+ const zend_ssa_op * ssa_op ,
3971
+ const zend_op_array * op_array ,
3972
+ const zend_ssa * ssa ,
3973
+ uint32_t t1 ,
3974
+ uint32_t t2 ,
3975
+ uint32_t t3 ,
3976
+ uint32_t val_type )
3977
+ {
3978
+ switch (opline -> opcode ) {
3979
+ case ZEND_ASSIGN_DIM_OP :
3980
+ if (opline -> extended_value != ZEND_CONCAT
3981
+ && val_type == IS_LONG
3982
+ && (t1 & (MAY_BE_ANY |MAY_BE_UNDEF |MAY_BE_REF )) == MAY_BE_ARRAY
3983
+ && MAY_BE_PACKED_ONLY (t1 )
3984
+ && !(t1 & MAY_BE_ARRAY_OF_REF )
3985
+ && (t2 & (MAY_BE_ANY |MAY_BE_UNDEF |MAY_BE_REF )) == MAY_BE_LONG
3986
+ && (t3 & (MAY_BE_ANY |MAY_BE_UNDEF |MAY_BE_REF )) == MAY_BE_LONG ) {
3987
+ return 0 ;
3988
+ }
3989
+ break ;
3990
+ default :
3991
+ break ;
3992
+ }
3993
+ return zend_may_throw_ex (opline , ssa_op , op_array , ssa , t1 , t2 );
3994
+ }
3995
+
3969
3996
static const void * zend_jit_trace (zend_jit_trace_rec * trace_buffer , uint32_t parent_trace , uint32_t exit_num )
3970
3997
{
3971
3998
const void * handler = NULL ;
@@ -4644,7 +4671,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4644
4671
op2_info , (opline -> op2_type != IS_UNUSED ) ? OP2_REG_ADDR () : 0 ,
4645
4672
(opline -> op2_type != IS_UNUSED ) ? OP2_RANGE () : NULL ,
4646
4673
op1_data_info , OP1_DATA_REG_ADDR (), OP1_DATA_RANGE (), val_type ,
4647
- zend_may_throw_ex (opline , ssa_op , op_array , ssa , op1_info , op2_info ))) {
4674
+ zend_jit_trace_may_throw (opline , ssa_op , op_array , ssa ,
4675
+ op1_info , op2_info , op1_data_info , val_type ))) {
4648
4676
goto jit_failure ;
4649
4677
}
4650
4678
goto done ;
0 commit comments