From: Dmitry Stogov Date: Fri, 13 Mar 2020 22:29:46 +0000 (+0300) Subject: Emit warning about type narrowing for tracing JIT as well X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a8f735c576a888e0c23425f9e198ef39821de69;p=php Emit warning about type narrowing for tracing JIT as well --- diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 495aedfda2..0dc6ab477d 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -1848,18 +1848,13 @@ static uint32_t get_ssa_alias_types(zend_ssa_alias_kind alias) { } \ } \ if (ssa_var_info[__var].type != __type) { \ + if (ssa_var_info[__var].type & ~__type) { \ + emit_type_narrowing_warning(op_array, ssa, __var); \ + return FAILURE; \ + } \ + ssa_var_info[__var].type = __type; \ if (update_worklist) { \ - if (ssa_var_info[__var].type & ~__type) { \ - emit_type_narrowing_warning(op_array, ssa, __var);\ - return FAILURE; \ - } \ - ssa_var_info[__var].type = __type; \ add_usages(op_array, ssa, worklist, __var); \ - } else { \ - if (ssa_var_info[__var].type & ~__type) { \ - return FAILURE; \ - } \ - ssa_var_info[__var].type = __type; \ } \ } \ /*zend_bitset_excl(worklist, var);*/ \