projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c941f1d
)
Remove RC1 and RCN from scalar types.
author
Dmitry Stogov
<dmitry@zend.com>
Wed, 3 Apr 2019 09:38:25 +0000
(12:38 +0300)
committer
Dmitry Stogov
<dmitry@zend.com>
Wed, 3 Apr 2019 09:38:25 +0000
(12:38 +0300)
ext/opcache/Optimizer/zend_inference.c
patch
|
blob
|
history
diff --git
a/ext/opcache/Optimizer/zend_inference.c
b/ext/opcache/Optimizer/zend_inference.c
index ccae1b462897f4776a54eb7942c2cc3b1854bfcc..95988f79b3ebfceff051d827f1357d11441bb6ee 100644
(file)
--- 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;