com php-src: Remove RC1 and RCN from scalar types.: ext/opcache/Optimizer/zend_inference.c
| From: | Dmitry Stogov | Date: | Wed, 03 Apr 2019 09:38:25 +0000 |
| Subject: | com php-src: Remove RC1 and RCN from scalar types.: ext/opcache/Optimizer/zend_inference.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105508@lists.php.net to get a copy of this message | ||
Commit: dd4d43c97d18781101f912b3d0d1dac36b8dc08d
Author: Dmitry Stogov <dmitry@zend.com> Wed, 3 Apr 2019 12:38:25 +0300
Parents: c941f1d8c7a1418d65d01803b421dfe746eb69a0
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dd4d43c97d18781101f912b3d0d1dac36b8dc08d
Log:
Remove RC1 and RCN from scalar types.
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 ccae1b4..95988f7 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -3746,6 +3746,9 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script
*script
if (!p->has_range_constraint) {
zend_ssa_type_constraint *constraint = &p->constraint.type;
tmp &= constraint->type_mask;
+ if (!(tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) {
+ tmp &= ~(MAY_BE_RC1|MAY_BE_RCN);
+ }
if ((tmp & MAY_BE_OBJECT) && constraint->ce && ce != constraint->ce)
{
if (!ce) {
ce = constraint->ce;