Lines Matching refs:var_info

866 				if (ssa->var_info[p->sources[0]].has_range) {  in zend_inference_calc_range()
867 *tmp = ssa->var_info[p->sources[0]].range; in zend_inference_calc_range()
878 ssa->var_info[p->ssa_var].has_range) { in zend_inference_calc_range()
882 ssa->var_info[p->ssa_var].range.min, in zend_inference_calc_range()
883 ssa->var_info[p->ssa_var].range.max, in zend_inference_calc_range()
899 } else if (ssa->var_info[p->sources[0]].has_range) { in zend_inference_calc_range()
901 *tmp = ssa->var_info[p->sources[0]].range; in zend_inference_calc_range()
906 } else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) { in zend_inference_calc_range()
907 tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow && tmp->underflow; in zend_inference_calc_range()
908 … if (!add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) { in zend_inference_calc_range()
909 …tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min); in zend_inference_calc_range()
917 } else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) { in zend_inference_calc_range()
918 … if (!add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) { in zend_inference_calc_range()
919 …tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max); in zend_inference_calc_range()
921 tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow && tmp->overflow; in zend_inference_calc_range()
929 } else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) { in zend_inference_calc_range()
930 … if (add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) { in zend_inference_calc_range()
934 tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow; in zend_inference_calc_range()
935 tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min; in zend_inference_calc_range()
946 } else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) { in zend_inference_calc_range()
947 … if (add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) { in zend_inference_calc_range()
951 tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max; in zend_inference_calc_range()
952 tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow; in zend_inference_calc_range()
963 if (ssa->var_info[p->sources[i]].has_range) { in zend_inference_calc_range()
965 tmp->underflow |= ssa->var_info[p->sources[i]].range.underflow; in zend_inference_calc_range()
966 tmp->min = MIN(tmp->min, ssa->var_info[p->sources[i]].range.min); in zend_inference_calc_range()
967 tmp->max = MAX(tmp->max, ssa->var_info[p->sources[i]].range.max); in zend_inference_calc_range()
968 tmp->overflow |= ssa->var_info[p->sources[i]].range.overflow; in zend_inference_calc_range()
1353 ssa->var_info[var].has_range = 1; in zend_inference_init_range()
1354 ssa->var_info[var].range.underflow = underflow; in zend_inference_init_range()
1355 ssa->var_info[var].range.min = min; in zend_inference_init_range()
1356 ssa->var_info[var].range.max = max; in zend_inference_init_range()
1357 ssa->var_info[var].range.overflow = overflow; in zend_inference_init_range()
1361 int zend_inference_widening_meet(zend_ssa_var_info *var_info, zend_ssa_range *r) in zend_inference_widening_meet() argument
1363 if (!var_info->has_range) { in zend_inference_widening_meet()
1364 var_info->has_range = 1; in zend_inference_widening_meet()
1367 var_info->range.underflow || in zend_inference_widening_meet()
1368 r->min < var_info->range.min) { in zend_inference_widening_meet()
1373 var_info->range.overflow || in zend_inference_widening_meet()
1374 r->max > var_info->range.max) { in zend_inference_widening_meet()
1378 if (var_info->range.min == r->min && in zend_inference_widening_meet()
1379 var_info->range.max == r->max && in zend_inference_widening_meet()
1380 var_info->range.underflow == r->underflow && in zend_inference_widening_meet()
1381 var_info->range.overflow == r->overflow) { in zend_inference_widening_meet()
1385 var_info->range = *r; in zend_inference_widening_meet()
1394 if (zend_inference_widening_meet(&ssa->var_info[var], &tmp)) { in zend_ssa_range_widening()
1402 int zend_inference_narrowing_meet(zend_ssa_var_info *var_info, zend_ssa_range *r) in zend_inference_narrowing_meet() argument
1404 if (!var_info->has_range) { in zend_inference_narrowing_meet()
1405 var_info->has_range = 1; in zend_inference_narrowing_meet()
1408 !var_info->range.underflow && in zend_inference_narrowing_meet()
1409 var_info->range.min < r->min) { in zend_inference_narrowing_meet()
1410 r->min = var_info->range.min; in zend_inference_narrowing_meet()
1413 !var_info->range.overflow && in zend_inference_narrowing_meet()
1414 var_info->range.max > r->max) { in zend_inference_narrowing_meet()
1415 r->max = var_info->range.max; in zend_inference_narrowing_meet()
1423 if (var_info->range.min == r->min && in zend_inference_narrowing_meet()
1424 var_info->range.max == r->max && in zend_inference_narrowing_meet()
1425 var_info->range.underflow == r->underflow && in zend_inference_narrowing_meet()
1426 var_info->range.overflow == r->overflow) { in zend_inference_narrowing_meet()
1430 var_info->range = *r; in zend_inference_narrowing_meet()
1439 if (zend_inference_narrowing_meet(&ssa->var_info[var], &tmp)) { in zend_ssa_range_narrowing()
1511 ssa->var_info[j].has_range && in zend_infer_ranges_warmup()
1520 if (tmp.min == ssa->var_info[j].range.min && in zend_infer_ranges_warmup()
1521 tmp.max == ssa->var_info[j].range.max) { in zend_infer_ranges_warmup()
1526 } else if (tmp.min == ssa->var_info[j].range.min && in zend_infer_ranges_warmup()
1527 tmp.max == ssa->var_info[j].range.max + 1 && in zend_infer_ranges_warmup()
1538 } else if (tmp.max == ssa->var_info[j].range.max && in zend_infer_ranges_warmup()
1539 tmp.min == ssa->var_info[j].range.min - 1 && in zend_infer_ranges_warmup()
1556 if (zend_inference_narrowing_meet(&ssa->var_info[j], &tmp)) { in zend_infer_ranges_warmup()
1633 if (!ssa->var_info[j].has_range) { in zend_infer_ranges()
1943 !ssa->var_info[result_var].has_range || in binary_op_result_type()
1944 ssa->var_info[result_var].range.underflow || in binary_op_result_type()
1945 ssa->var_info[result_var].range.overflow) { in binary_op_result_type()
1970 !ssa->var_info[result_var].has_range || in binary_op_result_type()
1971 ssa->var_info[result_var].range.underflow || in binary_op_result_type()
1972 ssa->var_info[result_var].range.overflow) { in binary_op_result_type()
2117 ce = ssa->var_info[ssa_op->op1_use].ce; in zend_fetch_prop_info()
2227 zend_ssa_var_info *ssa_var_info = ssa->var_info; in _zend_update_type_info()
3365 } else if (ssa_op->op1_use >= 0 && !ssa->var_info[ssa_op->op1_use].is_instanceof) { in _zend_update_type_info()
3366 ce = ssa->var_info[ssa_op->op1_use].ce; in _zend_update_type_info()
3606 zend_ssa_var_info *ssa_var_info = ssa->var_info; in zend_infer_types_ex()
3749 type = ssa->var_info[ssa_op->result_def].type; in can_convert_to_double()
3842 type = ssa->var_info[phi->ssa_var].type; in can_convert_to_double()
3870 if ((ssa->var_info[v].type & (MAY_BE_REF | MAY_BE_ANY | MAY_BE_UNDEF)) != MAY_BE_LONG) continue; in zend_type_narrowing()
3883 ssa->var_info[v].use_as_double = 1; in zend_type_narrowing()
3887 ssa->var_info[i].type &= ~MAY_BE_ANY; in zend_type_narrowing()
3982 if (!recursive && ssa_op && info->ssa.var_info && in zend_func_return_info()
3984 info->ssa.var_info[ssa_op->op1_use].recursive) { in zend_func_return_info()
4005 if (ssa_op && info->ssa.var_info && in zend_func_return_info()
4007 info->ssa.var_info[ssa_op->op1_use].ce) { in zend_func_return_info()
4008 arg_ce = info->ssa.var_info[ssa_op->op1_use].ce; in zend_func_return_info()
4009 arg_is_instanceof = info->ssa.var_info[ssa_op->op1_use].is_instanceof; in zend_func_return_info()
4093 } else if (ssa_op && info->ssa.var_info && ssa_op->op1_use >= 0) { in zend_func_return_info()
4094 if (info->ssa.var_info[ssa_op->op1_use].has_range) { in zend_func_return_info()
4097 tmp_range = info->ssa.var_info[ssa_op->op1_use].range; in zend_func_return_info()
4100 if (info->ssa.var_info[ssa_op->op1_use].range.underflow) { in zend_func_return_info()
4104 tmp_range.min = MIN(tmp_range.min, info->ssa.var_info[ssa_op->op1_use].range.min); in zend_func_return_info()
4106 if (info->ssa.var_info[ssa_op->op1_use].range.overflow) { in zend_func_return_info()
4110 tmp_range.max = MAX(tmp_range.max, info->ssa.var_info[ssa_op->op1_use].range.max); in zend_func_return_info()
4145 zend_ssa_var_info *ssa_var_info = ssa->var_info; in zend_infer_types()
4183 if (!ssa->var_info) { in zend_ssa_inference()
4184 ssa->var_info = zend_arena_calloc(arena, ssa->vars_count, sizeof(zend_ssa_var_info)); in zend_ssa_inference()
4186 ssa_var_info = ssa->var_info; in zend_ssa_inference()
4227 if (!info->ssa.var_info || !(info->flags & ZEND_FUNC_RECURSIVE)) { in zend_inference_check_recursive_dependencies()
4242 if (!info->ssa.var_info[i].recursive) { in zend_inference_check_recursive_dependencies()
4243 info->ssa.var_info[i].recursive = 1; in zend_inference_check_recursive_dependencies()
4520 zend_ssa_var_info *var_info = ssa->var_info + ssa_op->op1_use; in zend_may_throw_ex() local
4521 zend_class_entry *ce = var_info->ce; in zend_may_throw_ex()
4523 if (var_info->is_instanceof || in zend_may_throw_ex()