Lines Matching refs:op2
201 return CT_CONSTANT_EX(ctx->scdf.op_array, opline->op2.constant); in get_op2_value()
368 static inline int ct_eval_binary_op(zval *result, zend_uchar binop, zval *op1, zval *op2) { in ct_eval_binary_op() argument
370 if (IS_PARTIAL_ARRAY(op1) || IS_PARTIAL_ARRAY(op2)) { in ct_eval_binary_op()
374 return zend_optimizer_eval_binary_op(result, binop, op1, op2); in ct_eval_binary_op()
409 static inline int fetch_array_elem(zval **result, zval *op1, zval *op2) { in fetch_array_elem() argument
410 switch (Z_TYPE_P(op2)) { in fetch_array_elem()
421 *result = zend_hash_index_find(Z_ARR_P(op1), Z_LVAL_P(op2)); in fetch_array_elem()
424 *result = zend_hash_index_find(Z_ARR_P(op1), zend_dval_to_lval(Z_DVAL_P(op2))); in fetch_array_elem()
427 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
434 static inline int ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings) { in ct_eval_fetch_dim() argument
437 if (fetch_array_elem(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_dim()
443 if (zval_to_string_offset(&index, op2) == FAILURE) { in ct_eval_fetch_dim()
471 static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
474 if (fetch_array_elem(&value, op1, op2) == FAILURE) { in ct_eval_isset_dim()
623 static inline int fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
624 switch (Z_TYPE_P(op2)) { in fetch_obj_prop()
626 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
633 static inline int ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
636 if (fetch_obj_prop(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_obj()
644 static inline int ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
647 if (fetch_obj_prop(&value, op1, op2) == FAILURE) { in ct_eval_isset_obj()
723 static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
727 if (Z_TYPE_P(op2) != IS_ARRAY) { in ct_eval_in_array()
730 ht = Z_ARRVAL_P(op2); in ct_eval_in_array()
759 static inline int ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { in ct_eval_array_key_exists() argument
762 if (Z_TYPE_P(op2) != IS_ARRAY && !IS_PARTIAL_ARRAY(op2)) { in ct_eval_array_key_exists()
768 if (fetch_array_elem(&value, op2, op1) == FAILURE) { in ct_eval_array_key_exists()
771 if (IS_PARTIAL_ARRAY(op2) && (!value || IS_BOT(value))) { in ct_eval_array_key_exists()
1069 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
1072 op2 = get_op2_value(ctx, opline, ssa_op); in sccp_visit_instr()
1081 SET_RESULT(op1, op2); in sccp_visit_instr()
1084 SET_RESULT(result, op2); in sccp_visit_instr()
1121 if (op2) { in sccp_visit_instr()
1122 SKIP_IF_TOP(op2); in sccp_visit_instr()
1125 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1153 if (!op2) { in sccp_visit_instr()
1156 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1175 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1179 } else if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1223 SKIP_IF_TOP(op2); in sccp_visit_instr()
1225 if (IS_BOT(op2)) { in sccp_visit_instr()
1246 if (ct_eval_del_obj_prop(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1264 if (ct_eval_assign_obj(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1319 if (op2) { in sccp_visit_instr()
1320 SKIP_IF_TOP(op2); in sccp_visit_instr()
1331 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1356 if (!op2) { in sccp_visit_instr()
1359 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1380 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1383 } else if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1440 SET_RESULT_BOT(op2); in sccp_visit_instr()
1447 if ((op1 && IS_BOT(op1)) || (op2 && IS_BOT(op2))) { in sccp_visit_instr()
1452 SET_RESULT_BOT(op2); in sccp_visit_instr()
1479 SKIP_IF_TOP(op2); in sccp_visit_instr()
1481 if (ct_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
1495 if (op2) { in sccp_visit_instr()
1496 SKIP_IF_TOP(op2); in sccp_visit_instr()
1499 if (ct_eval_binary_op(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1507 && ssa_op->op1_def >= 0 && op2) { in sccp_visit_instr()
1513 if (ct_eval_fetch_dim(&tmp, op1, op2, 0) == SUCCESS) { in sccp_visit_instr()
1516 ct_eval_del_array_elem(&zv, op2); in sccp_visit_instr()
1537 if (ct_eval_assign_dim(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1558 if (ct_eval_fetch_obj(&tmp, op1, op2) == SUCCESS) { in sccp_visit_instr()
1561 ct_eval_del_obj_prop(&zv, op2); in sccp_visit_instr()
1578 if (ct_eval_assign_obj(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1600 SKIP_IF_TOP(op2); in sccp_visit_instr()
1606 if (ct_eval_fetch_obj(&tmp1, op1, op2) == SUCCESS in sccp_visit_instr()
1610 ct_eval_assign_obj(&zv, &tmp2, op2); in sccp_visit_instr()
1708 SKIP_IF_TOP(op2); in sccp_visit_instr()
1709 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1718 SKIP_IF_TOP(op2); in sccp_visit_instr()
1719 if (ct_eval_array_key_exists(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1730 SKIP_IF_TOP(op2); in sccp_visit_instr()
1732 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST_R)) == SUCCESS) { in sccp_visit_instr()
1741 SKIP_IF_TOP(op2); in sccp_visit_instr()
1743 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1754 SKIP_IF_TOP(op2); in sccp_visit_instr()
1756 if (ct_eval_fetch_obj(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1767 SKIP_IF_TOP(op2); in sccp_visit_instr()
1769 if (ct_eval_isset_obj(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1813 SKIP_IF_TOP(op2); in sccp_visit_instr()
1814 if (IS_PARTIAL_ARRAY(op2)) { in sccp_visit_instr()
1818 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1831 SKIP_IF_TOP(op2); in sccp_visit_instr()
1832 if (ct_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1851 name = CT_CONSTANT_EX(ctx->scdf.op_array, call->caller_init_opline->op2.constant); in sccp_visit_instr()
1912 SET_RESULT_BOT(op2); in sccp_visit_instr()
1997 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in sccp_mark_feasible_successors()
2015 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in sccp_mark_feasible_successors()
2405 opline->op2.constant = zend_optimizer_add_literal(op_array, value); in try_remove_definition()