com php-src: Fix SSA for SEND_UNPACK: ext/opcache/Optimiz er/zend_inference.c ext/opcache/Optimizer/zend_ssa.c
| From: | Nikita Popov | Date: | Sat, 16 Apr 2016 20:38:52 +0000 |
| Subject: | com php-src: Fix SSA for SEND_UNPACK: ext/opcache/Optimiz er/zend_inference.c ext/opcache/Optimizer/zend_ssa.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91752@lists.php.net to get a copy of this message | ||
Commit: 4f726be68224dca5ea6ffc3970dedffcd7daa639
Author: Nikita Popov <nikic@php.net> Sat, 16 Apr 2016 22:38:06 +0200
Parents: 12f42346a8646e45a83205c4e8fd9907622dc070
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4f726be68224dca5ea6ffc3970dedffcd7daa639
Log:
Fix SSA for SEND_UNPACK
Changed paths:
M ext/opcache/Optimizer/zend_inference.c
M ext/opcache/Optimizer/zend_ssa.c
Diff:
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 38a278d..10ed53e 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -3164,6 +3164,16 @@ static void zend_update_type_info(const zend_op_array *op_array,
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
}
break;
+ case ZEND_SEND_UNPACK:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = t1 | MAY_BE_RC1|MAY_BE_RCN;
+ if (t1 & MAY_BE_ARRAY) {
+ /* SEND_UNPACK may acquire references into the array */
+ tmp |= MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ }
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
case ZEND_FAST_CONCAT:
case ZEND_ROPE_INIT:
case ZEND_ROPE_ADD:
diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c
index a55ccc9..9d5f5a8 100644
--- a/ext/opcache/Optimizer/zend_ssa.c
+++ b/ext/opcache/Optimizer/zend_ssa.c
@@ -585,6 +585,7 @@ static int zend_ssa_rename(const zend_op_array *op_array, uint32_t build_flags,
case ZEND_SEND_VAR_NO_REF:
case ZEND_SEND_VAR_EX:
case ZEND_SEND_REF:
+ case ZEND_SEND_UNPACK:
case ZEND_FE_RESET_RW:
//TODO: ???
if (opline->op1_type == IS_CV) {