Lines Matching refs:tmp

431 …tic void zend_ssa_range_or(zend_long a, zend_long b, zend_long c, zend_long d, zend_ssa_range *tmp)  in zend_ssa_range_or()  argument
442 tmp->min = minOR(a, b, c, d); in zend_ssa_range_or()
443 tmp->max = maxOR(a, b, c, d); in zend_ssa_range_or()
446 tmp->min = minOR(a, b, c, -1); in zend_ssa_range_or()
447 tmp->max = maxOR(a, b, 0, d); in zend_ssa_range_or()
450 tmp->min = minOR(a, -1, c, d); in zend_ssa_range_or()
451 tmp->max = maxOR(0, b, c, d); in zend_ssa_range_or()
454 tmp->min = MIN(a, c); in zend_ssa_range_or()
455 tmp->max = maxOR(0, b, 0, d); in zend_ssa_range_or()
458 tmp->min = c; in zend_ssa_range_or()
459 tmp->max = -1; in zend_ssa_range_or()
462 tmp->min = a; in zend_ssa_range_or()
463 tmp->max = -1; in zend_ssa_range_or()
479 …ic void zend_ssa_range_and(zend_long a, zend_long b, zend_long c, zend_long d, zend_ssa_range *tmp) in zend_ssa_range_and() argument
490 tmp->min = minAND(a, b, c, d); in zend_ssa_range_and()
491 tmp->max = maxAND(a, b, c, d); in zend_ssa_range_and()
494 tmp->min = 0; in zend_ssa_range_and()
495 tmp->max = b; in zend_ssa_range_and()
498 tmp->min = 0; in zend_ssa_range_and()
499 tmp->max = d; in zend_ssa_range_and()
502 tmp->min = minAND(a, -1, c, -1); in zend_ssa_range_and()
503 tmp->max = MAX(b, d); in zend_ssa_range_and()
506 tmp->min = minAND(a, -1, c, d); in zend_ssa_range_and()
507 tmp->max = maxAND(0, b, c, d); in zend_ssa_range_and()
510 tmp->min = minAND(a, b, c, -1); in zend_ssa_range_and()
511 tmp->max = maxAND(a, b, 0, d); in zend_ssa_range_and()
553 zend_op *opline, zend_ssa_op *ssa_op, zend_uchar opcode, zend_ssa_range *tmp) { in zend_inference_calc_binary_op_range() argument
566 tmp->underflow = 1; in zend_inference_calc_binary_op_range()
567 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
569 tmp->min = op1_min + op2_min; in zend_inference_calc_binary_op_range()
574 tmp->overflow = 1; in zend_inference_calc_binary_op_range()
575 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
577 tmp->max = op1_max + op2_max; in zend_inference_calc_binary_op_range()
591 tmp->underflow = 1; in zend_inference_calc_binary_op_range()
592 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
594 tmp->min = op1_min - op2_max; in zend_inference_calc_binary_op_range()
599 tmp->overflow = 1; in zend_inference_calc_binary_op_range()
600 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
602 tmp->max = op1_max - op2_min; in zend_inference_calc_binary_op_range()
629 tmp->underflow = 1; in zend_inference_calc_binary_op_range()
630 tmp->overflow = 1; in zend_inference_calc_binary_op_range()
631 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
632 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
634 tmp->min = MIN(MIN(t1, t2), MIN(t3, t4)); in zend_inference_calc_binary_op_range()
635 tmp->max = MAX(MAX(t1, t2), MAX(t3, t4)); in zend_inference_calc_binary_op_range()
666 tmp->underflow = 1; in zend_inference_calc_binary_op_range()
667 tmp->overflow = 1; in zend_inference_calc_binary_op_range()
668 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
669 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
671 tmp->min = MIN(MIN(t1, t2), MIN(t3, t4)); in zend_inference_calc_binary_op_range()
672 tmp->max = MAX(MAX(t1, t2), MAX(t3, t4)); in zend_inference_calc_binary_op_range()
683 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
684 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
706 tmp->min = op1_max < op2_abs_min ? op1_min : 0; in zend_inference_calc_binary_op_range()
707 tmp->max = MIN(op1_max, op2_abs_max - 1); in zend_inference_calc_binary_op_range()
709 tmp->min = MAX(op1_min, -op2_abs_max + 1); in zend_inference_calc_binary_op_range()
710 tmp->max = op1_min > -op2_abs_min ? op1_max : 0; in zend_inference_calc_binary_op_range()
712 tmp->min = MAX(op1_min, -op2_abs_max + 1); in zend_inference_calc_binary_op_range()
713 tmp->max = MIN(op1_max, op2_abs_max - 1); in zend_inference_calc_binary_op_range()
725 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
726 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
743 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
744 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
750 tmp->min = MIN(MIN(t1, t2), MIN(t3, t4)); in zend_inference_calc_binary_op_range()
751 tmp->max = MAX(MAX(t1, t2), MAX(t3, t4)); in zend_inference_calc_binary_op_range()
763 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
764 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
791 tmp->min = MIN(MIN(t1, t2), MIN(t3, t4)); in zend_inference_calc_binary_op_range()
792 tmp->max = MAX(MAX(t1, t2), MAX(t3, t4)); in zend_inference_calc_binary_op_range()
803 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
804 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
810 zend_ssa_range_or(op1_min, op1_max, op2_min, op2_max, tmp); in zend_inference_calc_binary_op_range()
821 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_binary_op_range()
822 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_binary_op_range()
828 zend_ssa_range_and(op1_min, op1_max, op2_min, op2_max, tmp); in zend_inference_calc_binary_op_range()
841 … zend_op_array *op_array, zend_ssa *ssa, int var, int widening, int narrowing, zend_ssa_range *tmp) in zend_inference_calc_range() argument
851 tmp->underflow = 0; in zend_inference_calc_range()
852 tmp->min = ZEND_LONG_MAX; in zend_inference_calc_range()
853 tmp->max = ZEND_LONG_MIN; in zend_inference_calc_range()
854 tmp->overflow = 0; in zend_inference_calc_range()
859 *tmp = ssa->var_info[p->sources[0]].range; in zend_inference_calc_range()
861 tmp->underflow = 1; in zend_inference_calc_range()
862 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
863 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
864 tmp->overflow = 1; in zend_inference_calc_range()
876 tmp->min, in zend_inference_calc_range()
877 tmp->max); in zend_inference_calc_range()
879 tmp->max >= constraint->range.min) { in zend_inference_calc_range()
880 tmp->overflow = 0; in zend_inference_calc_range()
881 tmp->max = constraint->range.min - 1; in zend_inference_calc_range()
882 LOG_NEG_RANGE(" => [%ld..%ld]\n", tmp->min, tmp->max); in zend_inference_calc_range()
884 tmp->min <= constraint->range.max) { in zend_inference_calc_range()
885 tmp->underflow = 0; in zend_inference_calc_range()
886 tmp->min = constraint->range.max + 1; in zend_inference_calc_range()
887 LOG_NEG_RANGE(" => [%ld..%ld]\n", tmp->min, tmp->max); in zend_inference_calc_range()
893 *tmp = ssa->var_info[p->sources[0]].range; in zend_inference_calc_range()
895 tmp->underflow = constraint->range.underflow && tmp->underflow; in zend_inference_calc_range()
896 tmp->min = MAX(constraint->range.min, tmp->min); in zend_inference_calc_range()
899 tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow && tmp->underflow; in zend_inference_calc_range()
901tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min); in zend_inference_calc_range()
906 tmp->max = MIN(constraint->range.max, tmp->max); in zend_inference_calc_range()
907 tmp->overflow = constraint->range.overflow && tmp->overflow; in zend_inference_calc_range()
911tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max); in zend_inference_calc_range()
913 tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow && tmp->overflow; in zend_inference_calc_range()
918 tmp->underflow = constraint->range.underflow; in zend_inference_calc_range()
919 tmp->min = constraint->range.min; in zend_inference_calc_range()
923 tmp->underflow = 1; in zend_inference_calc_range()
924 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
926 tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow; in zend_inference_calc_range()
927 tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min; in zend_inference_calc_range()
931 tmp->underflow = 1; in zend_inference_calc_range()
932 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
935 tmp->max = constraint->range.max; in zend_inference_calc_range()
936 tmp->overflow = constraint->range.overflow; in zend_inference_calc_range()
940 tmp->overflow = 1; in zend_inference_calc_range()
941 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
943 tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max; in zend_inference_calc_range()
944 tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow; in zend_inference_calc_range()
948 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
949 tmp->overflow = 1; in zend_inference_calc_range()
957 tmp->underflow |= ssa->var_info[p->sources[i]].range.underflow; in zend_inference_calc_range()
958 tmp->min = MIN(tmp->min, ssa->var_info[p->sources[i]].range.min); in zend_inference_calc_range()
959 tmp->max = MAX(tmp->max, ssa->var_info[p->sources[i]].range.max); in zend_inference_calc_range()
960 tmp->overflow |= ssa->var_info[p->sources[i]].range.overflow; in zend_inference_calc_range()
962 tmp->underflow = 1; in zend_inference_calc_range()
963 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
964 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
965 tmp->overflow = 1; in zend_inference_calc_range()
969 return (tmp->min <= tmp->max); in zend_inference_calc_range()
974 tmp->min = 0; in zend_inference_calc_range()
975 tmp->max = 0; in zend_inference_calc_range()
976 tmp->underflow = 0; in zend_inference_calc_range()
977 tmp->overflow = 0; in zend_inference_calc_range()
985 tmp->underflow = 0; in zend_inference_calc_range()
986 tmp->overflow = 0; in zend_inference_calc_range()
1000 op_array, ssa, opline, &ssa->ops[line], opline->opcode, tmp); in zend_inference_calc_range()
1009 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1010 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1014 tmp->min = ~op1_max; in zend_inference_calc_range()
1015 tmp->max = ~op1_min; in zend_inference_calc_range()
1025 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1026 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1027 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1028 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1034 tmp->min = 0; in zend_inference_calc_range()
1035 tmp->max = 0; in zend_inference_calc_range()
1041 tmp->min = (op1_min > 0 || op1_max < 0); in zend_inference_calc_range()
1042 tmp->max = (op1_min != 0 || op1_max != 0); in zend_inference_calc_range()
1045 tmp->min = 0; in zend_inference_calc_range()
1046 tmp->max = 1; in zend_inference_calc_range()
1051 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1052 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1055 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1056 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1069 tmp->min = (op1_min > 0 || op1_max < 0); in zend_inference_calc_range()
1070 tmp->max = (op1_min != 0 || op1_max != 0); in zend_inference_calc_range()
1073 tmp->min = 0; in zend_inference_calc_range()
1074 tmp->max = 1; in zend_inference_calc_range()
1084 tmp->min = (op1_min == 0 && op1_max == 0); in zend_inference_calc_range()
1085 tmp->max = (op1_min <= 0 && op1_max >= 0); in zend_inference_calc_range()
1088 tmp->min = 0; in zend_inference_calc_range()
1089 tmp->max = 1; in zend_inference_calc_range()
1105 tmp->min = 0; in zend_inference_calc_range()
1106 tmp->max = 1; in zend_inference_calc_range()
1109 tmp->max = 0; in zend_inference_calc_range()
1111 tmp->min = 1; in zend_inference_calc_range()
1116 tmp->min = 0; in zend_inference_calc_range()
1117 tmp->max = 1; in zend_inference_calc_range()
1131 tmp->min = (op1_min == op1_max && in zend_inference_calc_range()
1134 tmp->max = (op1_min <= op2_max && op1_max >= op2_min); in zend_inference_calc_range()
1137 tmp->min = 0; in zend_inference_calc_range()
1138 tmp->max = 1; in zend_inference_calc_range()
1152 tmp->min = (op1_min > op2_max || op1_max < op2_min); in zend_inference_calc_range()
1153 tmp->max = (op1_min != op1_max || in zend_inference_calc_range()
1158 tmp->min = 0; in zend_inference_calc_range()
1159 tmp->max = 1; in zend_inference_calc_range()
1172 tmp->min = op1_max < op2_min; in zend_inference_calc_range()
1173 tmp->max = op1_min < op2_max; in zend_inference_calc_range()
1176 tmp->min = 0; in zend_inference_calc_range()
1177 tmp->max = 1; in zend_inference_calc_range()
1190 tmp->min = op1_max <= op2_min; in zend_inference_calc_range()
1191 tmp->max = op1_min <= op2_max; in zend_inference_calc_range()
1194 tmp->min = 0; in zend_inference_calc_range()
1195 tmp->max = 1; in zend_inference_calc_range()
1207 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1208 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1209 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1210 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1217 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1218 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1219 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1220 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1227 tmp->min = 0; in zend_inference_calc_range()
1228 tmp->max = 1; in zend_inference_calc_range()
1236 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1237 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1238 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1239 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1248 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1249 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1250 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1251 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1252 if (tmp->max < ZEND_LONG_MAX) { in zend_inference_calc_range()
1253 tmp->max++; in zend_inference_calc_range()
1255 tmp->overflow = 1; in zend_inference_calc_range()
1257 if (tmp->min < ZEND_LONG_MAX && !tmp->underflow) { in zend_inference_calc_range()
1258 tmp->min++; in zend_inference_calc_range()
1267 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1268 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1269 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1270 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1271 if (tmp->min > ZEND_LONG_MIN) { in zend_inference_calc_range()
1272 tmp->min--; in zend_inference_calc_range()
1274 tmp->underflow = 1; in zend_inference_calc_range()
1276 if (tmp->max > ZEND_LONG_MIN && !tmp->overflow) { in zend_inference_calc_range()
1277 tmp->max--; in zend_inference_calc_range()
1286 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1287 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1288 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1289 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1293 if (tmp->max < ZEND_LONG_MAX) { in zend_inference_calc_range()
1294 tmp->max++; in zend_inference_calc_range()
1296 tmp->overflow = 1; in zend_inference_calc_range()
1298 if (tmp->min < ZEND_LONG_MAX && !tmp->underflow) { in zend_inference_calc_range()
1299 tmp->min++; in zend_inference_calc_range()
1308 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1309 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1310 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1311 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1315 if (tmp->min > ZEND_LONG_MIN) { in zend_inference_calc_range()
1316 tmp->min--; in zend_inference_calc_range()
1318 tmp->underflow = 1; in zend_inference_calc_range()
1320 if (tmp->max > ZEND_LONG_MIN && !tmp->overflow) { in zend_inference_calc_range()
1321 tmp->max--; in zend_inference_calc_range()
1333 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1334 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1335 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1336 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1344 tmp->min = OP2_MIN_RANGE(); in zend_inference_calc_range()
1345 tmp->max = OP2_MAX_RANGE(); in zend_inference_calc_range()
1346 tmp->underflow = OP2_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1347 tmp->overflow = OP2_RANGE_OVERFLOW(); in zend_inference_calc_range()
1357 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1358 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1359 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1360 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1371 opline->extended_value, tmp); in zend_inference_calc_range()
1382 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1383 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1384 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1385 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1400 tmp->min = OP1_MIN_RANGE(); in zend_inference_calc_range()
1401 tmp->max = OP1_MAX_RANGE(); in zend_inference_calc_range()
1402 tmp->underflow = OP1_RANGE_UNDERFLOW(); in zend_inference_calc_range()
1403 tmp->overflow = OP1_RANGE_OVERFLOW(); in zend_inference_calc_range()
1418 *tmp = func_info->arg_info[opline->op1.num-1].info.range; in zend_inference_calc_range()
1423 tmp->underflow = 0; in zend_inference_calc_range()
1424 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1425 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1426 tmp->overflow = 0; in zend_inference_calc_range()
1429 tmp->underflow = 0; in zend_inference_calc_range()
1430 tmp->min = 0; in zend_inference_calc_range()
1431 tmp->max = 1; in zend_inference_calc_range()
1432 tmp->overflow = 0; in zend_inference_calc_range()
1444 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1446 tmp->min = 0; in zend_inference_calc_range()
1448 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1453 tmp->min = 0; in zend_inference_calc_range()
1454 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1458 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1459 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1479 *tmp = func_info->return_info.range; in zend_inference_calc_range()
1489 tmp->underflow = 0; in zend_inference_calc_range()
1490 tmp->min = 0; in zend_inference_calc_range()
1491 tmp->max = 0; in zend_inference_calc_range()
1492 tmp->overflow = 0; in zend_inference_calc_range()
1494 tmp->min = ZEND_LONG_MIN; in zend_inference_calc_range()
1495 tmp->max = ZEND_LONG_MAX; in zend_inference_calc_range()
1498 tmp->min = 1; in zend_inference_calc_range()
1500 tmp->max = 1; in zend_inference_calc_range()
1560 zend_ssa_range tmp; in zend_ssa_range_widening() local
1562 if (zend_inference_calc_range(op_array, ssa, var, 1, 0, &tmp)) { in zend_ssa_range_widening()
1563 if (zend_inference_widening_meet(&ssa->var_info[var], &tmp)) { in zend_ssa_range_widening()
1564 …widening SCC %2d) %2d [%s%ld..%ld%s]\n", scc, var, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (t… in zend_ssa_range_widening()
1605 zend_ssa_range tmp; in zend_ssa_range_narrowing() local
1607 if (zend_inference_calc_range(op_array, ssa, var, 0, 1, &tmp)) { in zend_ssa_range_narrowing()
1608 if (zend_inference_narrowing_meet(&ssa->var_info[var], &tmp)) { in zend_ssa_range_narrowing()
1609 …narrowing SCC %2d) %2d [%s%ld..%ld%s]\n", scc, var, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (t… in zend_ssa_range_narrowing()
1643 zend_ssa_range tmp; in zend_infer_ranges_warmup() local
1677 if (zend_inference_calc_range(op_array, ssa, j, 0, 0, &tmp)) { in zend_infer_ranges_warmup()
1689 if (tmp.min == ssa->var_info[j].range.min && in zend_infer_ranges_warmup()
1690 tmp.max == ssa->var_info[j].range.max) { in zend_infer_ranges_warmup()
1695 } else if (tmp.min == ssa->var_info[j].range.min && in zend_infer_ranges_warmup()
1696 tmp.max == ssa->var_info[j].range.max + 1 && in zend_infer_ranges_warmup()
1697 tmp.max < constraint->range.min) { in zend_infer_ranges_warmup()
1707 } else if (tmp.max == ssa->var_info[j].range.max && in zend_infer_ranges_warmup()
1708 tmp.min == ssa->var_info[j].range.min - 1 && in zend_infer_ranges_warmup()
1709 tmp.min > constraint->range.max) { in zend_infer_ranges_warmup()
1725 if (zend_inference_narrowing_meet(&ssa->var_info[j], &tmp)) { in zend_infer_ranges_warmup()
1726 …rmup %2d SCC %2d) %2d [%s%ld..%ld%s]\n", n, scc, j, (tmp.underflow?"-- ":""), tmp.min, tmp.max, (t… in zend_infer_ranges_warmup()
1743 zend_ssa_range tmp; in zend_infer_ranges() local
1769 if (zend_inference_calc_range(op_array, ssa, j, 0, 1, &tmp)) { in zend_infer_ranges()
1770 zend_inference_init_range(op_array, ssa, j, tmp.underflow, tmp.min, tmp.max, tmp.overflow); in zend_infer_ranges()
2053 uint32_t tmp = 0; in zend_array_element_type() local
2058tmp |= MAY_BE_ANY | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_… in zend_array_element_type()
2060tmp |= MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_… in zend_array_element_type()
2065 tmp |= MAY_BE_NULL; in zend_array_element_type()
2067 tmp |= MAY_BE_NULL | ((t1 & MAY_BE_ARRAY_OF_ANY) >> MAY_BE_ARRAY_SHIFT); in zend_array_element_type()
2068 if (tmp & MAY_BE_ARRAY) { in zend_array_element_type()
2069 tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_array_element_type()
2074 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_array_element_type()
2076 tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN; in zend_array_element_type()
2078 } else if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_array_element_type()
2079 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_array_element_type()
2084 tmp |= MAY_BE_STRING | MAY_BE_RC1; in zend_array_element_type()
2086 tmp |= MAY_BE_NULL; in zend_array_element_type()
2090 tmp |= MAY_BE_NULL; in zend_array_element_type()
2093 tmp |= MAY_BE_ERROR; in zend_array_element_type()
2098 tmp |= MAY_BE_NULL; in zend_array_element_type()
2100 tmp |= MAY_BE_ERROR; in zend_array_element_type()
2103 return tmp; in zend_array_element_type()
2108 uint32_t tmp = arr_type & ~(MAY_BE_RC1|MAY_BE_RCN); in assign_dim_result_type() local
2111 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in assign_dim_result_type()
2112 tmp |= MAY_BE_ARRAY|MAY_BE_RC1; in assign_dim_result_type()
2114 if (tmp & (MAY_BE_ARRAY|MAY_BE_STRING)) { in assign_dim_result_type()
2115 tmp |= MAY_BE_RC1; in assign_dim_result_type()
2117 if (tmp & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in assign_dim_result_type()
2118 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in assign_dim_result_type()
2120 if (tmp & MAY_BE_ARRAY) { in assign_dim_result_type()
2125 tmp |= MAY_BE_ARRAY_OF_NULL; in assign_dim_result_type()
2128 tmp |= MAY_BE_ARRAY_KEY_LONG; in assign_dim_result_type()
2131 tmp |= MAY_BE_ARRAY_KEY_LONG; in assign_dim_result_type()
2134 tmp |= MAY_BE_ARRAY_KEY_STRING; in assign_dim_result_type()
2137 tmp |= MAY_BE_ARRAY_KEY_LONG; in assign_dim_result_type()
2141 tmp |= MAY_BE_ARRAY_KEY_STRING; in assign_dim_result_type()
2147 if (tmp & MAY_BE_ARRAY_KEY_ANY) { in assign_dim_result_type()
2148 tmp |= (value_type & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT; in assign_dim_result_type()
2151 return tmp; in assign_dim_result_type()
2158 uint32_t tmp = 0; in binary_op_result_type() local
2167 tmp |= MAY_BE_OBJECT | MAY_BE_FALSE | MAY_BE_RC1; in binary_op_result_type()
2179 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in binary_op_result_type()
2181 tmp |= MAY_BE_LONG; in binary_op_result_type()
2184 tmp |= MAY_BE_DOUBLE; in binary_op_result_type()
2186 tmp |= MAY_BE_ARRAY | MAY_BE_RC1; in binary_op_result_type()
2187 tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF); in binary_op_result_type()
2188 tmp |= t2 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF); in binary_op_result_type()
2190 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in binary_op_result_type()
2192 tmp |= MAY_BE_ARRAY | MAY_BE_RC1; in binary_op_result_type()
2193 tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF); in binary_op_result_type()
2194 tmp |= t2 & (MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF); in binary_op_result_type()
2206 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in binary_op_result_type()
2208 tmp |= MAY_BE_LONG; in binary_op_result_type()
2211 tmp |= MAY_BE_DOUBLE; in binary_op_result_type()
2213 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in binary_op_result_type()
2219 tmp |= MAY_BE_DOUBLE; in binary_op_result_type()
2221 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in binary_op_result_type()
2227 tmp |= MAY_BE_LONG; in binary_op_result_type()
2234 tmp |= MAY_BE_STRING | MAY_BE_RC1; in binary_op_result_type()
2237 tmp |= MAY_BE_LONG; in binary_op_result_type()
2242 tmp |= MAY_BE_LONG; in binary_op_result_type()
2247 tmp = MAY_BE_STRING | MAY_BE_RC1 | MAY_BE_RCN; in binary_op_result_type()
2251 return tmp; in binary_op_result_type()
2288 uint32_t tmp = 0; in zend_fetch_arg_info() local
2294 tmp |= MAY_BE_OBJECT; in zend_fetch_arg_info()
2298 tmp |= zend_convert_type_code_to_may_be(ZEND_TYPE_CODE(arg_info->type)); in zend_fetch_arg_info()
2300 tmp |= MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF; in zend_fetch_arg_info()
2303 tmp |= MAY_BE_NULL; in zend_fetch_arg_info()
2305 return tmp; in zend_fetch_arg_info()
2434 uint32_t tmp, orig; in zend_update_type_info() local
2455 tmp = 0; in zend_update_type_info()
2457 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2460 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2463 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def); in zend_update_type_info()
2481tmp = binary_op_result_type(ssa, opline->opcode, t1, t2, ssa_ops[i].result_def, optimization_level… in zend_update_type_info()
2482 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2485 tmp = 0; in zend_update_type_info()
2487 tmp |= MAY_BE_STRING | MAY_BE_RC1; in zend_update_type_info()
2490 tmp |= MAY_BE_LONG; in zend_update_type_info()
2495 tmp |= MAY_BE_OBJECT | MAY_BE_RC1; in zend_update_type_info()
2498 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2526 tmp = MAY_BE_FALSE|MAY_BE_TRUE; in zend_update_type_info()
2528 tmp |= MAY_BE_NULL; in zend_update_type_info()
2530 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2534 tmp = t1; in zend_update_type_info()
2539 tmp |= MAY_BE_RCN; in zend_update_type_info()
2543 tmp |= MAY_BE_RCN; in zend_update_type_info()
2545 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2548 tmp = 0; in zend_update_type_info()
2550 tmp |= MAY_BE_TRUE|MAY_BE_FALSE; in zend_update_type_info()
2552 tmp |= 1 << opline->extended_value; in zend_update_type_info()
2553 if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_update_type_info()
2554 if ((tmp & MAY_BE_ANY) == (t1 & MAY_BE_ANY)) { in zend_update_type_info()
2555 tmp |= (t1 & MAY_BE_RC1) | MAY_BE_RCN; in zend_update_type_info()
2559 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2562 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2564 tmp |= MAY_BE_RC1; in zend_update_type_info()
2570 tmp |= t1 & (MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF); in zend_update_type_info()
2573 tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
2575tmp |= ((t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT) | ((t1 & MAY_BE_ANY)? MAY_BE_ARRAY_KEY_LONG : 0); in zend_update_type_info()
2578 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2585 tmp = t1; in zend_update_type_info()
2587 tmp |= MAY_BE_RCN; in zend_update_type_info()
2589 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2592 tmp = t1 & ~(MAY_BE_UNDEF|MAY_BE_REF); in zend_update_type_info()
2594 tmp |= MAY_BE_NULL; in zend_update_type_info()
2597 tmp |= (t1 & (MAY_BE_RC1|MAY_BE_RCN)); in zend_update_type_info()
2599 tmp |= MAY_BE_RCN; in zend_update_type_info()
2604 tmp &= ~MAY_BE_NULL; in zend_update_type_info()
2607 tmp &= ~MAY_BE_FALSE; in zend_update_type_info()
2610 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2620 tmp = 0; in zend_update_type_info()
2628 tmp |= MAY_BE_REF; in zend_update_type_info()
2639 tmp |= MAY_BE_REF; in zend_update_type_info()
2643 tmp |= binary_op_result_type( in zend_update_type_info()
2646 if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY)) { in zend_update_type_info()
2647 tmp |= MAY_BE_RC1; in zend_update_type_info()
2649 if (tmp & (MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_update_type_info()
2650 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2655 orig = assign_dim_result_type(orig, OP2_INFO(), tmp, opline->op2_type); in zend_update_type_info()
2676 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2684 tmp |= MAY_BE_NULL; in zend_update_type_info()
2688 tmp |= MAY_BE_NULL; in zend_update_type_info()
2693 tmp |= MAY_BE_NULL; in zend_update_type_info()
2699 tmp |= MAY_BE_NULL; in zend_update_type_info()
2704 tmp &= zend_fetch_prop_type(script, prop_info, NULL); in zend_update_type_info()
2709 tmp &= zend_fetch_prop_type(script, prop_info, NULL); in zend_update_type_info()
2712 tmp &= ~MAY_BE_REF; in zend_update_type_info()
2713 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2722 tmp = 0; in zend_update_type_info()
2724 tmp |= MAY_BE_REF; in zend_update_type_info()
2727 tmp |= MAY_BE_RC1; in zend_update_type_info()
2729 tmp |= MAY_BE_RCN; in zend_update_type_info()
2741 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2743 tmp |= MAY_BE_LONG; in zend_update_type_info()
2747 tmp |= MAY_BE_NULL; in zend_update_type_info()
2751 tmp |= MAY_BE_LONG; in zend_update_type_info()
2753 tmp |= MAY_BE_NULL; in zend_update_type_info()
2757 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2760 tmp |= MAY_BE_DOUBLE; in zend_update_type_info()
2763 tmp |= MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2765tmp |= t1 & (MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_… in zend_update_type_info()
2768 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2771 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2777 tmp = 0; in zend_update_type_info()
2779 tmp |= MAY_BE_RC1|MAY_BE_RCN; in zend_update_type_info()
2781 tmp |= t1 & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_REF|MAY_BE_RCN); in zend_update_type_info()
2783 tmp |= MAY_BE_NULL; in zend_update_type_info()
2785 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2787 tmp = 0; in zend_update_type_info()
2789 tmp |= MAY_BE_REF; in zend_update_type_info()
2792 tmp |= MAY_BE_RC1; in zend_update_type_info()
2803 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2805 tmp |= MAY_BE_LONG; in zend_update_type_info()
2809 tmp |= MAY_BE_NULL; in zend_update_type_info()
2813 tmp |= MAY_BE_LONG; in zend_update_type_info()
2815 tmp |= MAY_BE_NULL; in zend_update_type_info()
2819 tmp |= MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2822 tmp |= MAY_BE_DOUBLE; in zend_update_type_info()
2825 tmp |= MAY_BE_STRING | MAY_BE_LONG | MAY_BE_DOUBLE; in zend_update_type_info()
2827tmp |= t1 & (MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_RESOURCE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_… in zend_update_type_info()
2830 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2835 tmp = assign_dim_result_type(t1, t2, OP1_DATA_INFO(), opline->op2_type); in zend_update_type_info()
2836 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2840 tmp = 0; in zend_update_type_info()
2842 tmp |= MAY_BE_STRING; in zend_update_type_info()
2845tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_… in zend_update_type_info()
2850 tmp |= MAY_BE_NULL; in zend_update_type_info()
2854 tmp |= MAY_BE_NULL; in zend_update_type_info()
2859 tmp |= MAY_BE_NULL; in zend_update_type_info()
2862 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2864 tmp |= MAY_BE_REF; in zend_update_type_info()
2866 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2871 tmp = OP1_INFO(); in zend_update_type_info()
2872 if (tmp & (MAY_BE_ANY | MAY_BE_REF)) { in zend_update_type_info()
2873 if (tmp & MAY_BE_RC1) { in zend_update_type_info()
2874 tmp |= MAY_BE_RCN; in zend_update_type_info()
2877 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2882 tmp = t1; in zend_update_type_info()
2884 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in zend_update_type_info()
2885 tmp |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2887 if (tmp & MAY_BE_OBJECT) { in zend_update_type_info()
2888 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2890 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2895 tmp = zend_fetch_prop_type(script, in zend_update_type_info()
2897 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2905 tmp = OP1_INFO(); in zend_update_type_info()
2906 if (tmp & (MAY_BE_ANY | MAY_BE_REF)) { in zend_update_type_info()
2907 if (tmp & MAY_BE_RC1) { in zend_update_type_info()
2908 tmp |= MAY_BE_RCN; in zend_update_type_info()
2911 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2919 tmp = t1; in zend_update_type_info()
2921 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in zend_update_type_info()
2922 tmp |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2924 if (tmp & MAY_BE_OBJECT) { in zend_update_type_info()
2925 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2927 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2932tmp = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_A… in zend_update_type_info()
2933 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
2938 tmp = t2; in zend_update_type_info()
2939 if (tmp & (MAY_BE_ANY | MAY_BE_REF)) { in zend_update_type_info()
2940 if (tmp & MAY_BE_RC1) { in zend_update_type_info()
2941 tmp |= MAY_BE_RCN; in zend_update_type_info()
2944 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def); in zend_update_type_info()
2946 tmp = t2 & ~(MAY_BE_UNDEF|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
2948 tmp |= MAY_BE_NULL; in zend_update_type_info()
2951 tmp |= MAY_BE_REF; in zend_update_type_info()
2954 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
2956 tmp |= t2 & (MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
2958 tmp |= MAY_BE_RCN; in zend_update_type_info()
2960 if (RETURN_VALUE_USED(opline) && (tmp & MAY_BE_RC1)) { in zend_update_type_info()
2961 tmp |= MAY_BE_RCN; in zend_update_type_info()
2965 tmp &= ~MAY_BE_LONG; in zend_update_type_info()
2966 tmp |= MAY_BE_DOUBLE; in zend_update_type_info()
2968 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2972 UPDATE_SSA_TYPE(tmp & ~MAY_BE_REF, ssa_ops[i].result_def); in zend_update_type_info()
2979 tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
2981 tmp |= MAY_BE_NULL; in zend_update_type_info()
2983 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def); in zend_update_type_info()
2986 tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF; in zend_update_type_info()
2988 tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
2991 tmp |= MAY_BE_NULL; in zend_update_type_info()
2993 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
2995 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3000 tmp = t1; in zend_update_type_info()
3002 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in zend_update_type_info()
3003 tmp |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3005 if (tmp & MAY_BE_OBJECT) { in zend_update_type_info()
3006 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3008 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3014 tmp = (MAY_BE_REF | MAY_BE_RCN | MAY_BE_RC1 | t2) & ~MAY_BE_UNDEF; in zend_update_type_info()
3016 tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_ERROR|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3019 tmp |= MAY_BE_NULL; in zend_update_type_info()
3022 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3027 tmp = (MAY_BE_REF | t2) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3029 tmp |= MAY_BE_NULL; in zend_update_type_info()
3031 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3042 tmp = MAY_BE_REF | MAY_BE_ANY in zend_update_type_info()
3044 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3047 tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF in zend_update_type_info()
3050 tmp |= MAY_BE_UNDEF; in zend_update_type_info()
3052 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3056 tmp = t1; in zend_update_type_info()
3058 tmp |= MAY_BE_RCN; in zend_update_type_info()
3060 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3067 tmp = t2 | MAY_BE_REF; in zend_update_type_info()
3069 tmp = t2 & ~(MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3071 tmp |= MAY_BE_RCN; in zend_update_type_info()
3074 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def); in zend_update_type_info()
3081 tmp = t1 | MAY_BE_REF; in zend_update_type_info()
3083 tmp = t1 & ~(MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3085 tmp |= MAY_BE_RCN; in zend_update_type_info()
3088 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3092 tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF in zend_update_type_info()
3094 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3100tmp = (t1 & MAY_BE_UNDEF)|MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_… in zend_update_type_info()
3101 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3106tmp = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_… in zend_update_type_info()
3107 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3112 tmp = t1; in zend_update_type_info()
3114 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3117 tmp |= MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3121 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3123 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3144 tmp = zend_fetch_arg_info(script, arg_info, &ce); in zend_update_type_info()
3148 tmp |= MAY_BE_NULL; in zend_update_type_info()
3151 tmp |= MAY_BE_REF; in zend_update_type_info()
3152 } else if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_update_type_info()
3153 tmp |= MAY_BE_RC1|MAY_BE_RCN; in zend_update_type_info()
3156tmp = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_… in zend_update_type_info()
3160 tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF)) | in zend_update_type_info()
3161 (tmp & func_info->arg_info[opline->op1.num-1].info.type); in zend_update_type_info()
3171 tmp = MAY_BE_UNDEF|MAY_BE_RCN; in zend_update_type_info()
3174 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3231 tmp = MAY_BE_RC1|MAY_BE_RCN|MAY_BE_OBJECT; in zend_update_type_info()
3240 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3250 tmp = (MAY_BE_REF | t1) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3252 tmp |= MAY_BE_NULL; in zend_update_type_info()
3255 tmp = (MAY_BE_REF | t1) & ~(MAY_BE_UNDEF|MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3257 tmp |= MAY_BE_NULL; in zend_update_type_info()
3260 tmp = (MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | t1); in zend_update_type_info()
3262 tmp = t1; in zend_update_type_info()
3264 tmp |= MAY_BE_RCN; in zend_update_type_info()
3267 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3270 tmp = MAY_BE_RC1|MAY_BE_ARRAY; in zend_update_type_info()
3272 tmp |= ssa_var_info[ssa_ops[i].result_use].type; in zend_update_type_info()
3275 tmp |= (t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT; in zend_update_type_info()
3277 tmp |= MAY_BE_ARRAY_OF_NULL; in zend_update_type_info()
3280 tmp |= MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3283 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3286 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3289 tmp |= MAY_BE_ARRAY_KEY_STRING; in zend_update_type_info()
3292 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3296 tmp |= MAY_BE_ARRAY_KEY_STRING; in zend_update_type_info()
3300 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3304 tmp = ssa_var_info[ssa_ops[i].result_use].type; in zend_update_type_info()
3305 ZEND_ASSERT(tmp & MAY_BE_ARRAY); in zend_update_type_info()
3308 tmp |= MAY_BE_ARRAY_KEY_LONG | (t1 & (MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF)); in zend_update_type_info()
3311 tmp |= MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY; in zend_update_type_info()
3313 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3316 tmp = MAY_BE_UNDEF; in zend_update_type_info()
3319 tmp |= MAY_BE_REF; in zend_update_type_info()
3321 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3333 tmp = t1; in zend_update_type_info()
3335 tmp |= MAY_BE_REF; in zend_update_type_info()
3338 tmp |= MAY_BE_RCN; in zend_update_type_info()
3341 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3346 tmp = MAY_BE_REF | (t1 & (MAY_BE_ARRAY | MAY_BE_OBJECT)); in zend_update_type_info()
3348tmp = MAY_BE_RC1 | MAY_BE_RCN | (t1 & (MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_ANY | MAY_B… in zend_update_type_info()
3350 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3355 tmp = t2; in zend_update_type_info()
3358tmp |= MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3360tmp |= MAY_BE_REF | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_… in zend_update_type_info()
3365tmp |= MAY_BE_REF | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_… in zend_update_type_info()
3367 tmp |= ((t1 & MAY_BE_ARRAY_OF_ANY) >> MAY_BE_ARRAY_SHIFT); in zend_update_type_info()
3368 if (tmp & MAY_BE_ARRAY) { in zend_update_type_info()
3369 tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3372 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3373 } else if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_update_type_info()
3374 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3378 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op2_def); in zend_update_type_info()
3380 tmp = (ssa_ops[i].result_use >= 0) ? RES_USE_INFO() : 0; in zend_update_type_info()
3382tmp |= MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_… in zend_update_type_info()
3386 tmp |= MAY_BE_LONG; in zend_update_type_info()
3389 tmp |= MAY_BE_STRING | MAY_BE_RCN; in zend_update_type_info()
3392 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3404 tmp = t1 & ~(MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3411 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in zend_update_type_info()
3413 tmp |= MAY_BE_ARRAY | MAY_BE_RC1; in zend_update_type_info()
3416 tmp |= MAY_BE_RC1; in zend_update_type_info()
3418 tmp |= t1 & MAY_BE_RCN; in zend_update_type_info()
3422 tmp |= t1 & (MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3425 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3428 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3431 tmp |= MAY_BE_ARRAY_KEY_STRING; in zend_update_type_info()
3434 tmp |= MAY_BE_ARRAY_KEY_LONG; in zend_update_type_info()
3438 tmp |= MAY_BE_ARRAY_KEY_STRING; in zend_update_type_info()
3443 tmp |= MAY_BE_RC1; in zend_update_type_info()
3446 tmp |= t1 & (MAY_BE_RC1|MAY_BE_RCN); in zend_update_type_info()
3462 tmp |= MAY_BE_ARRAY | MAY_BE_ARRAY_OF_ARRAY; in zend_update_type_info()
3474 tmp |= MAY_BE_ARRAY_OF_OBJECT; in zend_update_type_info()
3489 tmp |= MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3495 if (tmp & MAY_BE_ARRAY_OF_LONG) { in zend_update_type_info()
3497 tmp |= MAY_BE_ARRAY_OF_DOUBLE; in zend_update_type_info()
3498 } else if (!(tmp & (MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_DOUBLE))) { in zend_update_type_info()
3499 tmp |= MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_DOUBLE; in zend_update_type_info()
3511 if ((tmp & MAY_BE_ARRAY) && (tmp & MAY_BE_ARRAY_KEY_ANY)) { in zend_update_type_info()
3512 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3515 tmp = (tmp & (MAY_BE_RC1|MAY_BE_RCN)) | (t1 & ~(MAY_BE_RC1|MAY_BE_RCN)); in zend_update_type_info()
3516 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3521 tmp = zend_array_element_type( in zend_update_type_info()
3530 tmp |= MAY_BE_ERROR; in zend_update_type_info()
3532 tmp |= MAY_BE_ERROR; in zend_update_type_info()
3534 tmp |= MAY_BE_ERROR; in zend_update_type_info()
3537 tmp |= MAY_BE_NULL; in zend_update_type_info()
3539 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3552 tmp = t1; in zend_update_type_info()
3558 tmp &= ~(MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE); in zend_update_type_info()
3559 tmp |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3563 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3567 tmp = zend_fetch_prop_type(script, in zend_update_type_info()
3570 tmp |= MAY_BE_REF | MAY_BE_ERROR; in zend_update_type_info()
3572 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3584 tmp = zend_fetch_prop_type(script, in zend_update_type_info()
3587 tmp |= MAY_BE_REF | MAY_BE_ERROR; in zend_update_type_info()
3589 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3609 tmp = zend_get_func_info(call_info, ssa) & ~FUNC_MAY_WARN; in zend_update_type_info()
3610 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3627 tmp = MAY_BE_LONG; in zend_update_type_info()
3629 tmp |= MAY_BE_NULL; in zend_update_type_info()
3631 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3653 tmp = t1; in zend_update_type_info()
3658 tmp = zend_fetch_arg_info(script, ret_info, &ce); in zend_update_type_info()
3659 if (tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) { in zend_update_type_info()
3660 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3664 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3671 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3680tmp = MAY_BE_REF|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_… in zend_update_type_info()
3681 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3683 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3694tmp = MAY_BE_ANY | MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_A… in zend_update_type_info()
3695 UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def); in zend_update_type_info()
3698 tmp = MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; in zend_update_type_info()
3700 tmp |= MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3702 tmp |= MAY_BE_REF | MAY_BE_RC1 | MAY_BE_RCN; in zend_update_type_info()
3704 UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def); in zend_update_type_info()
3765 uint32_t tmp, worklist_len = zend_bitset_len(ssa_vars_count); in zend_infer_types_ex() local
3775 tmp = get_ssa_var_info(ssa, p->sources[0]); in zend_infer_types_ex()
3779 tmp &= constraint->type_mask; in zend_infer_types_ex()
3780 if (!(tmp & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE))) { in zend_infer_types_ex()
3781 tmp &= ~(MAY_BE_RC1|MAY_BE_RCN); in zend_infer_types_ex()
3783 if ((tmp & MAY_BE_OBJECT) && constraint->ce && ce != constraint->ce) { in zend_infer_types_ex()
3796 UPDATE_SSA_TYPE(tmp, j); in zend_infer_types_ex()
3803 tmp = 0; in zend_infer_types_ex()
3805 tmp |= get_ssa_var_info(ssa, p->sources[i]); in zend_infer_types_ex()
3807 UPDATE_SSA_TYPE(tmp, j); in zend_infer_types_ex()
4112 uint32_t tmp = 0; in zend_func_return_info() local
4157 tmp |= t1; in zend_func_return_info()
4292 ret->type = tmp; in zend_func_return_info()