Skip to content

Commit 9a8f735

Browse files
committed
Emit warning about type narrowing for tracing JIT as well
1 parent 29bf790 commit 9a8f735

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,18 +1848,13 @@ static uint32_t get_ssa_alias_types(zend_ssa_alias_kind alias) {
18481848
} \
18491849
} \
18501850
if (ssa_var_info[__var].type != __type) { \
1851+
if (ssa_var_info[__var].type & ~__type) { \
1852+
emit_type_narrowing_warning(op_array, ssa, __var); \
1853+
return FAILURE; \
1854+
} \
1855+
ssa_var_info[__var].type = __type; \
18511856
if (update_worklist) { \
1852-
if (ssa_var_info[__var].type & ~__type) { \
1853-
emit_type_narrowing_warning(op_array, ssa, __var);\
1854-
return FAILURE; \
1855-
} \
1856-
ssa_var_info[__var].type = __type; \
18571857
add_usages(op_array, ssa, worklist, __var); \
1858-
} else { \
1859-
if (ssa_var_info[__var].type & ~__type) { \
1860-
return FAILURE; \
1861-
} \
1862-
ssa_var_info[__var].type = __type; \
18631858
} \
18641859
} \
18651860
/*zend_bitset_excl(worklist, var);*/ \

0 commit comments

Comments
 (0)