Skip to content

Commit 9a3ca27

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure
2 parents 42a162e + c4ee668 commit 9a3ca27

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11276,28 +11276,28 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1127611276
|6:
1127711277
}
1127811278

11279-
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11280-
| SET_EX_OPLINE opline, REG0
11281-
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11282-
may_throw = 1;
11283-
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1, ZREG_TMP1
11284-
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11285-
| LOAD_32BIT_VAL FCARG1w, opline->op1.var
11286-
| EXT_CALL zend_jit_undefined_op_helper, REG0
11287-
|1:
11288-
}
11279+
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11280+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
11281+
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11282+
| SET_EX_OPLINE opline, REG0
11283+
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11284+
may_throw = 1;
11285+
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1, ZREG_TMP1
11286+
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11287+
| LOAD_32BIT_VAL FCARG1w, opline->op1.var
11288+
| EXT_CALL zend_jit_undefined_op_helper, REG0
11289+
|1:
11290+
}
1128911291

11290-
if (op2_info & MAY_BE_UNDEF) {
11291-
may_throw = 1;
11292-
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1, ZREG_TMP1
11293-
| LOAD_32BIT_VAL FCARG1w, opline->op2.var
11294-
| EXT_CALL zend_jit_undefined_op_helper, REG0
11295-
|1:
11292+
if (op2_info & MAY_BE_UNDEF) {
11293+
may_throw = 1;
11294+
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1, ZREG_TMP1
11295+
| LOAD_32BIT_VAL FCARG1w, opline->op2.var
11296+
| EXT_CALL zend_jit_undefined_op_helper, REG0
11297+
|1:
11298+
}
1129611299
}
11297-
}
1129811300

11299-
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11300-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1130111301
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1130211302
may_throw = 1;
1130311303
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11941,28 +11941,28 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1194111941
|6:
1194211942
}
1194311943

11944-
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11945-
| SET_EX_OPLINE opline, r0
11946-
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11947-
may_throw = 1;
11948-
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
11949-
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11950-
| mov FCARG1d, opline->op1.var
11951-
| EXT_CALL zend_jit_undefined_op_helper, r0
11952-
|1:
11953-
}
11944+
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11945+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
11946+
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11947+
| SET_EX_OPLINE opline, r0
11948+
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11949+
may_throw = 1;
11950+
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
11951+
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11952+
| mov FCARG1d, opline->op1.var
11953+
| EXT_CALL zend_jit_undefined_op_helper, r0
11954+
|1:
11955+
}
1195411956

11955-
if (op2_info & MAY_BE_UNDEF) {
11956-
may_throw = 1;
11957-
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
11958-
| mov FCARG1d, opline->op2.var
11959-
| EXT_CALL zend_jit_undefined_op_helper, r0
11960-
|1:
11957+
if (op2_info & MAY_BE_UNDEF) {
11958+
may_throw = 1;
11959+
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
11960+
| mov FCARG1d, opline->op2.var
11961+
| EXT_CALL zend_jit_undefined_op_helper, r0
11962+
|1:
11963+
}
1196111964
}
11962-
}
1196311965

11964-
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11965-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1196611966
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1196711967
may_throw = 1;
1196811968
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {

0 commit comments

Comments
 (0)