com php-src: cleanup: ext/opcache/jit/zend_jit.c ext/opca che/jit/zend_jit_trace.c ext/opcache/jit/zend_jit_x 86.dasc
| From: | Dmitry Stogov | Date: | Thu, 16 Jul 2020 14:09:14 +0000 |
| Subject: | com php-src: cleanup: ext/opcache/jit/zend_jit.c ext/opca che/jit/zend_jit_trace.c ext/opcache/jit/zend_jit_x 86.dasc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112190@lists.php.net to get a copy of this message | ||
Commit: 03a98d9420a8ffa4b31c28e11792c161eaf49d82
Author: Dmitry Stogov <dmitry@zend.com> Thu, 16 Jul 2020 17:09:14 +0300
Parents: 7e357f470d11aea776947ff4a7f66d1aee6dd503
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=03a98d9420a8ffa4b31c28e11792c161eaf49d82
Log:
cleanup
Changed paths:
M ext/opcache/jit/zend_jit.c
M ext/opcache/jit/zend_jit_trace.c
M ext/opcache/jit/zend_jit_x86.dasc
Diff:
diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c
index 7c352f0802..74f63c53a4 100644
--- a/ext/opcache/jit/zend_jit.c
+++ b/ext/opcache/jit/zend_jit.c
@@ -2731,7 +2731,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const
zend_op
if (PROFITABILITY_CHECKS && (!ssa->ops || !ssa->var_info)) {
break;
}
- if (!zend_jit_fetch_dim_read(&dasm_state, opline, op_array,
+ if (!zend_jit_fetch_dim_read(&dasm_state, opline, op_array, ssa, ssa_op,
OP1_INFO(), OP1_REG_ADDR(), OP2_INFO(), RES_INFO(),
zend_may_throw(opline, ssa_op, op_array, ssa))) {
goto jit_failure;
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c
index b15346545c..bb0de117a9 100644
--- a/ext/opcache/jit/zend_jit_trace.c
+++ b/ext/opcache/jit/zend_jit_trace.c
@@ -3760,7 +3760,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t
par
op2_info = OP2_INFO();
CHECK_OP2_TRACE_TYPE();
res_info = RES_INFO();
- if (!zend_jit_fetch_dim_read(&dasm_state, opline, op_array,
+ if (!zend_jit_fetch_dim_read(&dasm_state, opline, op_array, ssa, ssa_op,
op1_info, op1_addr, op2_info, res_info,
(
(op1_info & MAY_BE_ANY) != MAY_BE_ARRAY ||
@@ -3774,11 +3774,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t
par
(op2_info &
(MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_ARRAY))
!= 0)))) {
goto jit_failure;
}
- if ((res_info & MAY_BE_GUARD)
- && JIT_G(current_frame)
- && (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_ARRAY) {
- ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD;
- }
goto done;
case ZEND_ISSET_ISEMPTY_DIM_OBJ:
if ((opline->extended_value & ZEND_ISEMPTY)) {
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 407d8a178d..61a055ef4d 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -10256,7 +10256,7 @@ static int zend_jit_zval_copy_deref(dasm_State **Dst, zend_jit_addr
res_addr, ze
return 1;
}
-static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_op *opline, const zend_op_array
*op_array, uint32_t op1_info, zend_jit_addr op1_addr, uint32_t op2_info, uint32_t res_info, int
may_throw)
+static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_op *opline, const zend_op_array
*op_array, zend_ssa *ssa, const zend_ssa_op *ssa_op, uint32_t op1_info, zend_jit_addr op1_addr,
uint32_t op2_info, uint32_t res_info, int may_throw)
{
zend_jit_addr orig_op1_addr, op2_addr, res_addr;
const void *exit_addr = NULL;
@@ -10314,6 +10314,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, const zend_op *opline,
cons
}
}
res_info &= ~MAY_BE_GUARD;
+ ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD;
}
if (op1_info & MAY_BE_REF) {