Skip to content

Commit aaf8a6b

Browse files
shqkingdstogov
authored andcommitted
Support failed JIT test case: assign_static_prop_001.phpt
For function Foo(), the original handlers would be invoked for the first two statements. And the third statement "$a = 42", where ASSIGN opcode is involved, covers the cold code in function zend_jit_assign_to_variable(). For function $main(), statement "var_dump(Foo::$prop);" covers a new path in function zend_ jit_send_val() for SEND_VAL opcode. Besides, another 2 test cases, i.e. fetch_dim_r_003.phpt and fetch_dim_r_004.phpt, would pass as well with this patch.
1 parent 7676236 commit aaf8a6b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3579,26 +3579,25 @@ static int zend_jit_assign_to_variable(dasm_State **Dst,
35793579
| IF_ZVAL_REFCOUNTED var_use_addr, >1, TMP1w, TMP2
35803580
|.cold_code
35813581
|1:
3582-
| brk #0 // TODO
35833582
in_cold = 1;
35843583
}
35853584
if (Z_REG(var_use_addr) == ZREG_FCARG1x || Z_REG(var_use_addr) == ZREG_REG0) {
35863585
bool keep_gc = 0;
35873586

35883587
| brk #0 // TODO
35893588
} else {
3590-
| brk #0 // TODO
35913589
| GET_ZVAL_PTR FCARG1x, var_use_addr, TMP1
35923590
if (!zend_jit_simple_assign(Dst, opline, var_addr, var_info, var_def_info, val_type, val_addr, val_info, res_addr, in_cold, 1)) {
35933591
return 0;
35943592
}
35953593
}
35963594
| GC_DELREF FCARG1x, TMP1w
35973595
if (RC_MAY_BE_N(var_info) && (var_info & (MAY_BE_ARRAY|MAY_BE_OBJECT)) != 0) {
3598-
| brk #0 // TODO
3596+
| bne >4
35993597
} else {
36003598
| brk #0 // TODO
36013599
}
3600+
| brk #0
36023601
| ZVAL_DTOR_FUNC var_info, opline, TMP1
36033602
if (in_cold || (RC_MAY_BE_N(var_info) && (var_info & (MAY_BE_ARRAY|MAY_BE_OBJECT)) != 0)) {
36043603
if (check_exception) {
@@ -3609,9 +3608,10 @@ static int zend_jit_assign_to_variable(dasm_State **Dst,
36093608
}
36103609
if (RC_MAY_BE_N(var_info) && (var_info & (MAY_BE_ARRAY|MAY_BE_OBJECT)) != 0) {
36113610
|4:
3612-
| brk #0 // TODO
3611+
| IF_GC_MAY_NOT_LEAK FCARG1x, >8, TMP1w, TMP2w
3612+
| EXT_CALL gc_possible_root, REG0
36133613
if (in_cold) {
3614-
| brk #0 // TODO
3614+
| b >8
36153615
}
36163616
}
36173617
if (in_cold) {
@@ -5210,12 +5210,12 @@ static int zend_jit_send_val(dasm_State **Dst, const zend_op *opline, uint32_t o
52105210
if (opline->op1_type == IS_CONST) {
52115211
zval *zv = RT_CONSTANT(opline, opline->op1);
52125212

5213-
| ZVAL_COPY_CONST arg_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_REG0, ZREG_TMP1, ZREG_FPR0
5213+
| ZVAL_COPY_CONST arg_addr, MAY_BE_ANY, MAY_BE_ANY, zv, ZREG_REG0, ZREG_TMP1, ZREG_FPR0
52145214
if (Z_REFCOUNTED_P(zv)) {
52155215
| brk #0 // TODO: test
52165216
}
52175217
} else {
5218-
| brk #0 // TODO: test
5218+
| ZVAL_COPY_VALUE arg_addr, MAY_BE_ANY, op1_addr, op1_info, ZREG_REG0, ZREG_REG2, ZREG_TMP1, ZREG_TMP2, ZREG_FPR0
52195219
}
52205220

52215221
return 1;

0 commit comments

Comments
 (0)