Skip to content

Commit d102f27

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure
2 parents cdc5adb + 9a3ca27 commit d102f27

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
@@ -11255,28 +11255,28 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1125511255
|6:
1125611256
}
1125711257

11258-
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11259-
| SET_EX_OPLINE opline, REG0
11260-
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11261-
may_throw = 1;
11262-
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1, ZREG_TMP1
11263-
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11264-
| LOAD_32BIT_VAL FCARG1w, opline->op1.var
11265-
| EXT_CALL zend_jit_undefined_op_helper, REG0
11266-
|1:
11267-
}
11258+
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11259+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
11260+
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11261+
| SET_EX_OPLINE opline, REG0
11262+
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11263+
may_throw = 1;
11264+
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1, ZREG_TMP1
11265+
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11266+
| LOAD_32BIT_VAL FCARG1w, opline->op1.var
11267+
| EXT_CALL zend_jit_undefined_op_helper, REG0
11268+
|1:
11269+
}
1126811270

11269-
if (op2_info & MAY_BE_UNDEF) {
11270-
may_throw = 1;
11271-
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1, ZREG_TMP1
11272-
| LOAD_32BIT_VAL FCARG1w, opline->op2.var
11273-
| EXT_CALL zend_jit_undefined_op_helper, REG0
11274-
|1:
11271+
if (op2_info & MAY_BE_UNDEF) {
11272+
may_throw = 1;
11273+
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1, ZREG_TMP1
11274+
| LOAD_32BIT_VAL FCARG1w, opline->op2.var
11275+
| EXT_CALL zend_jit_undefined_op_helper, REG0
11276+
|1:
11277+
}
1127511278
}
11276-
}
1127711279

11278-
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11279-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1128011280
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1128111281
may_throw = 1;
1128211282
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
@@ -11921,28 +11921,28 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1192111921
|6:
1192211922
}
1192311923

11924-
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11925-
| SET_EX_OPLINE opline, r0
11926-
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11927-
may_throw = 1;
11928-
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
11929-
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11930-
| mov FCARG1d, opline->op1.var
11931-
| EXT_CALL zend_jit_undefined_op_helper, r0
11932-
|1:
11933-
}
11924+
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11925+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
11926+
if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) {
11927+
| SET_EX_OPLINE opline, r0
11928+
if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) {
11929+
may_throw = 1;
11930+
| IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1
11931+
| // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var))));
11932+
| mov FCARG1d, opline->op1.var
11933+
| EXT_CALL zend_jit_undefined_op_helper, r0
11934+
|1:
11935+
}
1193411936

11935-
if (op2_info & MAY_BE_UNDEF) {
11936-
may_throw = 1;
11937-
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
11938-
| mov FCARG1d, opline->op2.var
11939-
| EXT_CALL zend_jit_undefined_op_helper, r0
11940-
|1:
11937+
if (op2_info & MAY_BE_UNDEF) {
11938+
may_throw = 1;
11939+
| IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1
11940+
| mov FCARG1d, opline->op2.var
11941+
| EXT_CALL zend_jit_undefined_op_helper, r0
11942+
|1:
11943+
}
1194111944
}
11942-
}
1194311945

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)))) {
1194611946
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1194711947
may_throw = 1;
1194811948
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {

0 commit comments

Comments
 (0)