com php-src: More accurate reference counting inference: ext/opcache/Optimizer/zend_inference.c
| From: | Dmitry Stogov | Date: | Thu, 17 Aug 2017 17:03:12 +0000 |
| Subject: | com php-src: More accurate reference counting inference: ext/opcache/Optimizer/zend_inference.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99074@lists.php.net to get a copy of this message | ||
Commit: 3866c1699e5d4acdbd2f580b0d3d93dc4f2efa1a
Author: Dmitry Stogov <dmitry@zend.com> Thu, 17 Aug 2017 20:03:12 +0300
Parents: 30fb70dd25cb2db805fa1f97b1293b34409f402a
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3866c1699e5d4acdbd2f580b0d3d93dc4f2efa1a
Log:
More accurate reference counting inference
Changed paths:
M ext/opcache/Optimizer/zend_inference..c
Diff:
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 6457c93..9d5d6cf 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -2978,13 +2978,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
tmp |= MAY_BE_ARRAY | MAY_BE_RC1;
}
- if (t1 & MAY_BE_STRING) {
- tmp |= MAY_BE_RC1;
- }
- if (t1 & MAY_BE_ARRAY) {
+ if (t1 & (MAY_BE_STRING|MAY_BE_ARRAY)) {
tmp |= MAY_BE_RC1;
if (opline->opcode == ZEND_FETCH_DIM_FUNC_ARG) {
- tmp |= MAY_BE_RCN;
+ tmp |= t1 & MAY_BE_RCN;
}
}
if (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) {