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 zend_long lval = zend_dval_to_lval(Z_DVAL_P(op2)); in fetch_array_elem()
432 if (!zend_is_long_compatible(Z_DVAL_P(op2), lval)) { in fetch_array_elem()
439 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
446 static inline int ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings) { in ct_eval_fetch_dim() argument
449 if (fetch_array_elem(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_dim()
455 if (zval_to_string_offset(&index, op2) == FAILURE) { in ct_eval_fetch_dim()
483 static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
486 if (fetch_array_elem(&value, op1, op2) == FAILURE) { in ct_eval_isset_dim()
646 static inline int fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
647 switch (Z_TYPE_P(op2)) { in fetch_obj_prop()
649 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
656 static inline int ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
659 if (fetch_obj_prop(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_obj()
667 static inline int ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
670 if (fetch_obj_prop(&value, op1, op2) == FAILURE) { in ct_eval_isset_obj()
750 static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
754 if (Z_TYPE_P(op2) != IS_ARRAY) { in ct_eval_in_array()
757 ht = Z_ARRVAL_P(op2); in ct_eval_in_array()
785 static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { in ct_eval_array_key_exists() argument
788 if (Z_TYPE_P(op2) != IS_ARRAY && !IS_PARTIAL_ARRAY(op2)) { in ct_eval_array_key_exists()
794 if (fetch_array_elem(&value, op2, op1) == FAILURE) { in ct_eval_array_key_exists()
797 if (IS_PARTIAL_ARRAY(op2) && (!value || IS_BOT(value))) { in ct_eval_array_key_exists()
992 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
995 op2 = get_op2_value(ctx, opline, ssa_op); in sccp_visit_instr()
1006 SET_RESULT(op1, op2); in sccp_visit_instr()
1007 SET_RESULT(result, op2); in sccp_visit_instr()
1045 if (op2) { in sccp_visit_instr()
1046 SKIP_IF_TOP(op2); in sccp_visit_instr()
1049 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1077 if (!op2) { in sccp_visit_instr()
1080 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1099 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1103 } else if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1142 SKIP_IF_TOP(op2); in sccp_visit_instr()
1144 if (IS_BOT(op2)) { in sccp_visit_instr()
1165 if (ct_eval_del_obj_prop(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1183 if (ct_eval_assign_obj(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1238 if (op2) { in sccp_visit_instr()
1239 SKIP_IF_TOP(op2); in sccp_visit_instr()
1250 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1275 if (!op2) { in sccp_visit_instr()
1278 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1299 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1302 } else if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1359 SET_RESULT_BOT(op2); in sccp_visit_instr()
1366 if ((op1 && IS_BOT(op1)) || (op2 && IS_BOT(op2))) { in sccp_visit_instr()
1371 SET_RESULT_BOT(op2); in sccp_visit_instr()
1399 SKIP_IF_TOP(op2); in sccp_visit_instr()
1401 if (ct_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
1415 if (op2) { in sccp_visit_instr()
1416 SKIP_IF_TOP(op2); in sccp_visit_instr()
1419 if (ct_eval_binary_op(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1427 && ssa_op->op1_def >= 0 && op2) { in sccp_visit_instr()
1433 if (ct_eval_fetch_dim(&tmp, op1, op2, 0) == SUCCESS) { in sccp_visit_instr()
1436 ct_eval_del_array_elem(&zv, op2); in sccp_visit_instr()
1457 if (ct_eval_assign_dim(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1478 if (ct_eval_fetch_obj(&tmp, op1, op2) == SUCCESS) { in sccp_visit_instr()
1481 ct_eval_del_obj_prop(&zv, op2); in sccp_visit_instr()
1498 if (ct_eval_assign_obj(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1520 SKIP_IF_TOP(op2); in sccp_visit_instr()
1526 if (ct_eval_fetch_obj(&tmp1, op1, op2) == SUCCESS in sccp_visit_instr()
1530 ct_eval_assign_obj(&zv, &tmp2, op2); in sccp_visit_instr()
1639 SKIP_IF_TOP(op2); in sccp_visit_instr()
1640 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1649 SKIP_IF_TOP(op2); in sccp_visit_instr()
1650 if (ct_eval_array_key_exists(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1661 SKIP_IF_TOP(op2); in sccp_visit_instr()
1663 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST_R)) == SUCCESS) { in sccp_visit_instr()
1672 SKIP_IF_TOP(op2); in sccp_visit_instr()
1674 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1685 SKIP_IF_TOP(op2); in sccp_visit_instr()
1687 if (ct_eval_fetch_obj(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1698 SKIP_IF_TOP(op2); in sccp_visit_instr()
1700 if (ct_eval_isset_obj(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1759 SKIP_IF_TOP(op2); in sccp_visit_instr()
1760 if (IS_PARTIAL_ARRAY(op2)) { in sccp_visit_instr()
1764 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1777 SKIP_IF_TOP(op2); in sccp_visit_instr()
1778 if (ct_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1797 name = CT_CONSTANT_EX(ctx->scdf.op_array, call->caller_init_opline->op2.constant); in sccp_visit_instr()
1859 SET_RESULT_BOT(op2); in sccp_visit_instr()
1957 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in sccp_mark_feasible_successors()
2412 opline->op2.constant = zend_optimizer_add_literal(op_array, value); in try_remove_definition()