summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-10-18 12:39:33 +0300
committerDmitry Stogov <dmitry@zend.com>2016-10-18 12:39:33 +0300
commitac6134fb64f5aa89aa6ef7bda32c29079c86aea8 (patch)
treea604000054e3f8dcd4bd508f71db4679ddabc702
parent14beea9a36f0d2e1ce4617ff52101dc77fcc6fd1 (diff)
downloadphp-git-ac6134fb64f5aa89aa6ef7bda32c29079c86aea8.tar.gz
Fixed type inference rules.
-rw-r--r--ext/opcache/Optimizer/zend_inference.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 33bab0e7c5..0635cc5119 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -2964,15 +2964,17 @@ static void zend_update_type_info(const zend_op_array *op_array,
}
break;
case ZEND_SEND_VAR_EX:
- case ZEND_SEND_VAR_NO_REF:
- case ZEND_SEND_VAR_NO_REF_EX:
- case ZEND_SEND_REF:
-// TODO: ???
if (ssa_ops[i].op1_def >= 0) {
tmp = (t1 & MAY_BE_UNDEF)|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
}
break;
+ case ZEND_SEND_REF:
+ if (ssa_ops[i].op1_def >= 0) {
+ tmp = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF;
+ UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
+ }
+ break;
case ZEND_SEND_UNPACK:
if (ssa_ops[i].op1_def >= 0) {
tmp = t1;