summaryrefslogtreecommitdiff
path: root/ext/opcache/jit/zend_jit_helpers.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-07-05 12:16:30 +0300
committerDmitry Stogov <dmitry@zend.com>2019-07-05 12:16:30 +0300
commit1b5b8175aff0fba41ce94d75d1ddf0f7be630b9c (patch)
tree7fef7cefe333517cf9640eee34b198e865a4f9e5 /ext/opcache/jit/zend_jit_helpers.c
parent215e9d069c3dae40d94894d1a938d771cecc2549 (diff)
parent48ca5a1e176c5301fedd1bc4f661969d6f9a49eb (diff)
downloadphp-git-1b5b8175aff0fba41ce94d75d1ddf0f7be630b9c.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
Diffstat (limited to 'ext/opcache/jit/zend_jit_helpers.c')
-rw-r--r--ext/opcache/jit/zend_jit_helpers.c44
1 files changed, 13 insertions, 31 deletions
diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c
index cfad5786ac..f45bfa8a39 100644
--- a/ext/opcache/jit/zend_jit_helpers.c
+++ b/ext/opcache/jit/zend_jit_helpers.c
@@ -757,18 +757,10 @@ static zend_never_inline ZEND_COLD void zend_wrong_string_offset(void)
uint32_t var;
switch (opline->opcode) {
- case ZEND_ASSIGN_ADD:
- case ZEND_ASSIGN_SUB:
- case ZEND_ASSIGN_MUL:
- case ZEND_ASSIGN_DIV:
- case ZEND_ASSIGN_MOD:
- case ZEND_ASSIGN_SL:
- case ZEND_ASSIGN_SR:
- case ZEND_ASSIGN_CONCAT:
- case ZEND_ASSIGN_BW_OR:
- case ZEND_ASSIGN_BW_AND:
- case ZEND_ASSIGN_BW_XOR:
- case ZEND_ASSIGN_POW:
+ case ZEND_ASSIGN_OP:
+ case ZEND_ASSIGN_DIM_OP:
+ case ZEND_ASSIGN_OBJ_OP:
+ case ZEND_ASSIGN_STATIC_PROP_OP:
msg = "Cannot use assign-op operators with string offsets";
break;
case ZEND_FETCH_DIM_W:
@@ -783,25 +775,15 @@ static zend_never_inline ZEND_COLD void zend_wrong_string_offset(void)
while (opline < end) {
if (opline->op1_type == IS_VAR && opline->op1.var == var) {
switch (opline->opcode) {
- case ZEND_ASSIGN_ADD:
- case ZEND_ASSIGN_SUB:
- case ZEND_ASSIGN_MUL:
- case ZEND_ASSIGN_DIV:
- case ZEND_ASSIGN_MOD:
- case ZEND_ASSIGN_SL:
- case ZEND_ASSIGN_SR:
- case ZEND_ASSIGN_CONCAT:
- case ZEND_ASSIGN_BW_OR:
- case ZEND_ASSIGN_BW_AND:
- case ZEND_ASSIGN_BW_XOR:
- case ZEND_ASSIGN_POW:
- if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- msg = "Cannot use string offset as an object";
- } else if (opline->extended_value == ZEND_ASSIGN_DIM) {
- msg = "Cannot use string offset as an array";
- } else {
- msg = "Cannot use assign-op operators with string offsets";
- }
+ case ZEND_ASSIGN_OBJ_OP:
+ msg = "Cannot use string offset as an object";
+ break;
+ case ZEND_ASSIGN_DIM_OP:
+ msg = "Cannot use string offset as an array";
+ break;
+ case ZEND_ASSIGN_OP:
+ case ZEND_ASSIGN_STATIC_PROP_OP:
+ msg = "Cannot use assign-op operators with string offsets";
break;
case ZEND_PRE_INC_OBJ:
case ZEND_PRE_DEC_OBJ: