Skip to content

Commit c4ee668

Browse files
committed
Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure
1 parent 2fde308 commit c4ee668

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12096,26 +12096,26 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1209612096
|6:
1209712097
}
1209812098

12099-
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
12100-
| SET_EX_OPLINE opline, r0
12101-
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
12102-
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
12103-
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
12104-
| mov FCARG1d, opline->op1.var
12105-
| EXT_CALL zend_jit_undefined_op_helper, r0
12106-
|1:
12107-
}
12099+
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
12100+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
12101+
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
12102+
| SET_EX_OPLINE opline, r0
12103+
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
12104+
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
12105+
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
12106+
| mov FCARG1d, opline->op1.var
12107+
| EXT_CALL zend_jit_undefined_op_helper, r0
12108+
|1:
12109+
}
1210812110

12109-
if (op2_info & MAY_BE_UNDEF) {
12110-
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
12111-
| mov FCARG1d, opline->op2.var
12112-
| EXT_CALL zend_jit_undefined_op_helper, r0
12113-
|1:
12111+
if (op2_info & MAY_BE_UNDEF) {
12112+
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
12113+
| mov FCARG1d, opline->op2.var
12114+
| EXT_CALL zend_jit_undefined_op_helper, r0
12115+
|1:
12116+
}
1211412117
}
12115-
}
1211612118

12117-
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
12118-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1211912119
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1212012120
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {
1212112121
| LOAD_ZVAL_ADDR FCARG1a, orig_op1_addr

0 commit comments

Comments
 (0)