@@ -10662,6 +10662,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10662
10662
const void *not_found_exit_addr = NULL;
10663
10663
const void *res_exit_addr = NULL;
10664
10664
zend_bool result_avoid_refcounting = 0;
10665
+ uint32_t may_be_string = (opline->opcode != ZEND_FETCH_LIST_R) ? MAY_BE_STRING : 0;
10665
10666
10666
10667
orig_op1_addr = OP1_ADDR();
10667
10668
op2_addr = OP2_ADDR();
@@ -10684,7 +10685,8 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10684
10685
zend_jit_trace_stack *stack = JIT_G(current_frame)->stack;
10685
10686
int32_t exit_point;
10686
10687
10687
- if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))
10688
+ if (opline->opcode != ZEND_FETCH_LIST_R
10689
+ && (opline->op1_type & (IS_VAR|IS_TMP_VAR))
10688
10690
&& !op1_avoid_refcounting) {
10689
10691
flags |= ZEND_JIT_EXIT_FREE_OP1;
10690
10692
}
@@ -10747,7 +10749,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10747
10749
10748
10750
if (op1_info & MAY_BE_ARRAY) {
10749
10751
if (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF) - MAY_BE_ARRAY)) {
10750
- if (exit_addr && !(op1_info & (MAY_BE_OBJECT|MAY_BE_STRING ))) {
10752
+ if (exit_addr && !(op1_info & (MAY_BE_OBJECT|may_be_string ))) {
10751
10753
| IF_NOT_ZVAL_TYPE op1_addr, IS_ARRAY, &exit_addr
10752
10754
} else {
10753
10755
| IF_NOT_ZVAL_TYPE op1_addr, IS_ARRAY, >7
@@ -10765,7 +10767,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10765
10767
|7:
10766
10768
}
10767
10769
10768
- if (op1_info & MAY_BE_STRING) {
10770
+ if (opline->opcode != ZEND_FETCH_LIST_R && ( op1_info & MAY_BE_STRING) ) {
10769
10771
if (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_STRING))) {
10770
10772
if (exit_addr && !(op1_info & MAY_BE_OBJECT)) {
10771
10773
| IF_NOT_ZVAL_TYPE op1_addr, IS_STRING, &exit_addr
@@ -10800,7 +10802,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10800
10802
}
10801
10803
10802
10804
if (op1_info & MAY_BE_OBJECT) {
10803
- if (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_STRING| MAY_BE_OBJECT))) {
10805
+ if (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string ))) {
10804
10806
if (exit_addr) {
10805
10807
| IF_NOT_ZVAL_TYPE op1_addr, IS_OBJECT, &exit_addr
10806
10808
} else {
@@ -10832,7 +10834,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10832
10834
| add r4, 12
10833
10835
|.endif
10834
10836
if ((op1_info & MAY_BE_ARRAY) ||
10835
- (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_STRING| MAY_BE_OBJECT)))) {
10837
+ (op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string )))) {
10836
10838
| jmp >9 // END
10837
10839
}
10838
10840
|6:
@@ -10856,10 +10858,10 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10856
10858
}
10857
10859
}
10858
10860
10859
- if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_STRING| MAY_BE_OBJECT)))
10861
+ if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string )))
10860
10862
&& !exit_addr) {
10861
- if (opline->opcode != ZEND_FETCH_DIM_IS) {
10862
- if ((opline->opcode != ZEND_FETCH_DIM_IS && ( op1_info & MAY_BE_UNDEF) ) || (op2_info & MAY_BE_UNDEF)) {
10863
+ if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R ) {
10864
+ if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {
10863
10865
| LOAD_ZVAL_ADDR FCARG1a, orig_op1_addr
10864
10866
} else {
10865
10867
| SET_EX_OPLINE opline, r0
@@ -10935,7 +10937,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
10935
10937
#endif
10936
10938
10937
10939
| FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
10938
- if (!op1_avoid_refcounting) {
10940
+ if (opline->opcode != ZEND_FETCH_LIST_R && !op1_avoid_refcounting) {
10939
10941
| FREE_OP opline->op1_type, opline->op1, op1_info, 0, opline
10940
10942
}
10941
10943
0 commit comments