@@ -1415,11 +1415,17 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
1415
1415
}
1416
1416
/* break missing intentionally */
1417
1417
case ZEND_ASSIGN_DIM :
1418
- if (opline -> op1_type != IS_CV ) {
1419
- break ;
1418
+ if (opline -> op1_type == IS_CV ) {
1419
+ ADD_OP1_DATA_TRACE_GUARD ();
1420
+ ADD_OP2_TRACE_GUARD ();
1421
+ ADD_OP1_TRACE_GUARD ();
1422
+ } else if (orig_op1_type != IS_UNKNOWN
1423
+ && (orig_op1_type & IS_TRACE_INDIRECT )
1424
+ && opline -> result_type == IS_UNUSED ) {
1425
+ // ADD_OP1_DATA_TRACE_GUARD();
1426
+ ADD_OP2_TRACE_GUARD ();
1420
1427
}
1421
- ADD_OP1_DATA_TRACE_GUARD ();
1422
- /* break missing intentionally */
1428
+ break ;
1423
1429
case ZEND_IS_EQUAL :
1424
1430
case ZEND_IS_NOT_EQUAL :
1425
1431
case ZEND_IS_SMALLER :
@@ -3661,11 +3667,21 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
3661
3667
// TODO: check for division by zero ???
3662
3668
break ;
3663
3669
}
3664
- if (opline -> op1_type != IS_CV || opline -> result_type != IS_UNUSED ) {
3670
+ if (opline -> result_type != IS_UNUSED ) {
3665
3671
break ;
3666
3672
}
3667
3673
op1_info = OP1_INFO ();
3668
3674
op1_addr = OP1_REG_ADDR ();
3675
+ if (opline -> op1_type == IS_VAR ) {
3676
+ if (orig_op1_type != IS_UNKNOWN
3677
+ && (orig_op1_type & IS_TRACE_INDIRECT )) {
3678
+ if (!zend_jit_fetch_indirect_var (& dasm_state , opline , orig_op1_type , & op1_info , & op1_addr )) {
3679
+ goto jit_failure ;
3680
+ }
3681
+ } else {
3682
+ break ;
3683
+ }
3684
+ }
3669
3685
if (orig_op1_type != IS_UNKNOWN
3670
3686
&& (orig_op1_type & IS_TRACE_REFERENCE )) {
3671
3687
if (!zend_jit_fetch_reference (& dasm_state , opline , orig_op1_type , & op1_info , & op1_addr ,
@@ -3692,11 +3708,19 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
3692
3708
}
3693
3709
goto done ;
3694
3710
case ZEND_ASSIGN_DIM :
3695
- if (opline -> op1_type != IS_CV ) {
3696
- break ;
3697
- }
3698
3711
op1_info = OP1_INFO ();
3699
3712
op1_addr = OP1_REG_ADDR ();
3713
+ if (opline -> op1_type == IS_VAR ) {
3714
+ if (orig_op1_type != IS_UNKNOWN
3715
+ && (orig_op1_type & IS_TRACE_INDIRECT )
3716
+ && opline -> result_type == IS_UNUSED ) {
3717
+ if (!zend_jit_fetch_indirect_var (& dasm_state , opline , orig_op1_type , & op1_info , & op1_addr )) {
3718
+ goto jit_failure ;
3719
+ }
3720
+ } else {
3721
+ break ;
3722
+ }
3723
+ }
3700
3724
if (orig_op1_type != IS_UNKNOWN
3701
3725
&& (orig_op1_type & IS_TRACE_REFERENCE )) {
3702
3726
if (!zend_jit_fetch_reference (& dasm_state , opline , orig_op1_type , & op1_info , & op1_addr ,
0 commit comments