Use zend_fetch_arg_info_type()

This commit is contained in:
Dmitry Stogov 2020-03-17 18:10:27 +03:00
parent 29bef78e9f
commit a8e8c40ad4

View File

@ -1287,7 +1287,9 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
ZEND_ASSERT(frame->call->func->op_array.arg_info); ZEND_ASSERT(frame->call->func->op_array.arg_info);
arg_info = &frame->call->func->op_array.arg_info[opline->op2.num - 1]; arg_info = &frame->call->func->op_array.arg_info[opline->op2.num - 1];
if (ZEND_TYPE_IS_SET(arg_info->type)) { if (ZEND_TYPE_IS_SET(arg_info->type)) {
info &= ZEND_TYPE_FULL_MASK(arg_info->type); zend_class_entry *ce;
uint32_t tmp = zend_fetch_arg_info_type(script, arg_info, &ce);
info &= tmp;
if (!info) { if (!info) {
break; break;
} }
@ -1470,6 +1472,8 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
tmp |= MAY_BE_REF; tmp |= MAY_BE_REF;
} }
ssa_var_info[v].type = tmp; ssa_var_info[v].type = tmp;
ssa_var_info[i].ce = ce;
ssa_var_info[i].is_instanceof = 1;
} else { } else {
ssa_var_info[v].type = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; ssa_var_info[v].type = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
} }