Lines Matching refs:op2
203 return CT_CONSTANT_EX(ctx->scdf.op_array, opline->op2.constant); in get_op2_value()
375 static inline int ct_eval_binary_op(zval *result, zend_uchar binop, zval *op1, zval *op2) { in ct_eval_binary_op() argument
377 if (IS_PARTIAL_ARRAY(op1) || IS_PARTIAL_ARRAY(op2)) { in ct_eval_binary_op()
381 return zend_optimizer_eval_binary_op(result, binop, op1, op2); in ct_eval_binary_op()
416 static inline int fetch_array_elem(zval **result, zval *op1, zval *op2) { in fetch_array_elem() argument
417 switch (Z_TYPE_P(op2)) { in fetch_array_elem()
428 *result = zend_hash_index_find(Z_ARR_P(op1), Z_LVAL_P(op2)); in fetch_array_elem()
431 *result = zend_hash_index_find(Z_ARR_P(op1), zend_dval_to_lval(Z_DVAL_P(op2))); in fetch_array_elem()
434 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
441 static inline int ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings) { in ct_eval_fetch_dim() argument
444 if (fetch_array_elem(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_dim()
450 if (zval_to_string_offset(&index, op2) == FAILURE) { in ct_eval_fetch_dim()
478 static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
481 if (fetch_array_elem(&value, op1, op2) == FAILURE) { in ct_eval_isset_dim()
630 static inline int fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
631 switch (Z_TYPE_P(op2)) { in fetch_obj_prop()
633 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
640 static inline int ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
643 if (fetch_obj_prop(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_obj()
651 static inline int ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
654 if (fetch_obj_prop(&value, op1, op2) == FAILURE) { in ct_eval_isset_obj()
734 static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
738 if (Z_TYPE_P(op2) != IS_ARRAY) { in ct_eval_in_array()
741 ht = Z_ARRVAL_P(op2); in ct_eval_in_array()
769 static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { in ct_eval_array_key_exists() argument
772 if (Z_TYPE_P(op2) != IS_ARRAY && !IS_PARTIAL_ARRAY(op2)) { in ct_eval_array_key_exists()
778 if (fetch_array_elem(&value, op2, op1) == FAILURE) { in ct_eval_array_key_exists()
781 if (IS_PARTIAL_ARRAY(op2) && (!value || IS_BOT(value))) { in ct_eval_array_key_exists()
1012 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
1015 op2 = get_op2_value(ctx, opline, ssa_op); in sccp_visit_instr()
1026 SET_RESULT(op1, op2); in sccp_visit_instr()
1027 SET_RESULT(result, op2); in sccp_visit_instr()
1065 if (op2) { in sccp_visit_instr()
1066 SKIP_IF_TOP(op2); in sccp_visit_instr()
1069 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1097 if (!op2) { in sccp_visit_instr()
1100 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1119 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1123 } else if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1162 SKIP_IF_TOP(op2); in sccp_visit_instr()
1164 if (IS_BOT(op2)) { in sccp_visit_instr()
1185 if (ct_eval_del_obj_prop(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1203 if (ct_eval_assign_obj(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1258 if (op2) { in sccp_visit_instr()
1259 SKIP_IF_TOP(op2); in sccp_visit_instr()
1270 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1295 if (!op2) { in sccp_visit_instr()
1298 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1319 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1322 } else if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1379 SET_RESULT_BOT(op2); in sccp_visit_instr()
1386 if ((op1 && IS_BOT(op1)) || (op2 && IS_BOT(op2))) { in sccp_visit_instr()
1391 SET_RESULT_BOT(op2); in sccp_visit_instr()
1419 SKIP_IF_TOP(op2); in sccp_visit_instr()
1421 if (ct_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
1435 if (op2) { in sccp_visit_instr()
1436 SKIP_IF_TOP(op2); in sccp_visit_instr()
1439 if (ct_eval_binary_op(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1447 && ssa_op->op1_def >= 0 && op2) { in sccp_visit_instr()
1453 if (ct_eval_fetch_dim(&tmp, op1, op2, 0) == SUCCESS) { in sccp_visit_instr()
1456 ct_eval_del_array_elem(&zv, op2); in sccp_visit_instr()
1477 if (ct_eval_assign_dim(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1498 if (ct_eval_fetch_obj(&tmp, op1, op2) == SUCCESS) { in sccp_visit_instr()
1501 ct_eval_del_obj_prop(&zv, op2); in sccp_visit_instr()
1518 if (ct_eval_assign_obj(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1540 SKIP_IF_TOP(op2); in sccp_visit_instr()
1546 if (ct_eval_fetch_obj(&tmp1, op1, op2) == SUCCESS in sccp_visit_instr()
1550 ct_eval_assign_obj(&zv, &tmp2, op2); in sccp_visit_instr()
1659 SKIP_IF_TOP(op2); in sccp_visit_instr()
1660 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1669 SKIP_IF_TOP(op2); in sccp_visit_instr()
1670 if (ct_eval_array_key_exists(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1681 SKIP_IF_TOP(op2); in sccp_visit_instr()
1683 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST_R)) == SUCCESS) { in sccp_visit_instr()
1692 SKIP_IF_TOP(op2); in sccp_visit_instr()
1694 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1705 SKIP_IF_TOP(op2); in sccp_visit_instr()
1707 if (ct_eval_fetch_obj(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1718 SKIP_IF_TOP(op2); in sccp_visit_instr()
1720 if (ct_eval_isset_obj(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1779 SKIP_IF_TOP(op2); in sccp_visit_instr()
1780 if (IS_PARTIAL_ARRAY(op2)) { in sccp_visit_instr()
1784 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1797 SKIP_IF_TOP(op2); in sccp_visit_instr()
1798 if (ct_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1817 name = CT_CONSTANT_EX(ctx->scdf.op_array, call->caller_init_opline->op2.constant); in sccp_visit_instr()
1878 SET_RESULT_BOT(op2); in sccp_visit_instr()
1976 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in sccp_mark_feasible_successors()
2426 opline->op2.constant = zend_optimizer_add_literal(op_array, value); in try_remove_definition()