Lines Matching refs:op2
201 return CT_CONSTANT_EX(ctx->scdf.op_array, opline->op2.constant); in get_op2_value()
379 static inline int ct_eval_binary_op(zval *result, zend_uchar binop, zval *op1, zval *op2) { in ct_eval_binary_op() argument
381 if (IS_PARTIAL_ARRAY(op1) || IS_PARTIAL_ARRAY(op2)) { in ct_eval_binary_op()
385 return zend_optimizer_eval_binary_op(result, binop, op1, op2); in ct_eval_binary_op()
420 static inline int fetch_array_elem(zval **result, zval *op1, zval *op2) { in fetch_array_elem() argument
421 switch (Z_TYPE_P(op2)) { in fetch_array_elem()
432 *result = zend_hash_index_find(Z_ARR_P(op1), Z_LVAL_P(op2)); in fetch_array_elem()
435 *result = zend_hash_index_find(Z_ARR_P(op1), zend_dval_to_lval(Z_DVAL_P(op2))); in fetch_array_elem()
438 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
445 static inline int ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings) { in ct_eval_fetch_dim() argument
448 if (fetch_array_elem(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_dim()
454 if (zval_to_string_offset(&index, op2) == FAILURE) { in ct_eval_fetch_dim()
482 static inline int ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
485 if (fetch_array_elem(&value, op1, op2) == FAILURE) { in ct_eval_isset_dim()
613 static inline int fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
614 switch (Z_TYPE_P(op2)) { in fetch_obj_prop()
616 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
623 static inline int ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
626 if (fetch_obj_prop(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_obj()
634 static inline int ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
637 if (fetch_obj_prop(&value, op1, op2) == FAILURE) { in ct_eval_isset_obj()
713 static inline int ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
717 if (Z_TYPE_P(op2) != IS_ARRAY) { in ct_eval_in_array()
720 ht = Z_ARRVAL_P(op2); in ct_eval_in_array()
1039 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
1042 op2 = get_op2_value(ctx, opline, ssa_op); in sccp_visit_instr()
1051 SET_RESULT(op1, op2); in sccp_visit_instr()
1054 SET_RESULT(result, op2); in sccp_visit_instr()
1091 if (op2) { in sccp_visit_instr()
1092 SKIP_IF_TOP(op2); in sccp_visit_instr()
1095 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1125 if (!op2) { in sccp_visit_instr()
1128 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1147 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1151 } else if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1186 SKIP_IF_TOP(op2); in sccp_visit_instr()
1188 if (IS_BOT(op2)) { in sccp_visit_instr()
1209 if (ct_eval_del_obj_prop(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1227 if (ct_eval_assign_obj(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1282 if (op2) { in sccp_visit_instr()
1283 SKIP_IF_TOP(op2); in sccp_visit_instr()
1294 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1321 if (!op2) { in sccp_visit_instr()
1324 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1345 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1348 } else if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1376 if ((op1 && IS_BOT(op1)) || (op2 && IS_BOT(op2))) { in sccp_visit_instr()
1381 SET_RESULT_BOT(op2); in sccp_visit_instr()
1408 SKIP_IF_TOP(op2); in sccp_visit_instr()
1410 if (ct_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
1432 if (op2) { in sccp_visit_instr()
1433 SKIP_IF_TOP(op2); in sccp_visit_instr()
1436 …if (ct_eval_binary_op(&zv, zend_compound_assign_to_binary_op(opline->opcode), op1, op2) == SUCCESS… in sccp_visit_instr()
1446 && op2) { in sccp_visit_instr()
1452 if (ct_eval_fetch_dim(&tmp, op1, op2, 0) == SUCCESS) { in sccp_visit_instr()
1455 ct_eval_del_array_elem(&zv, op2); in sccp_visit_instr()
1476 if (ct_eval_assign_dim(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1497 if (ct_eval_fetch_obj(&tmp, op1, op2) == SUCCESS) { in sccp_visit_instr()
1500 ct_eval_del_obj_prop(&zv, op2); in sccp_visit_instr()
1517 if (ct_eval_assign_obj(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1539 SKIP_IF_TOP(op2); in sccp_visit_instr()
1545 if (ct_eval_fetch_obj(&tmp1, op1, op2) == SUCCESS in sccp_visit_instr()
1549 ct_eval_assign_obj(&zv, &tmp2, op2); in sccp_visit_instr()
1647 SKIP_IF_TOP(op2); in sccp_visit_instr()
1648 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1659 SKIP_IF_TOP(op2); in sccp_visit_instr()
1661 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST_R)) == SUCCESS) { in sccp_visit_instr()
1670 SKIP_IF_TOP(op2); in sccp_visit_instr()
1672 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1683 SKIP_IF_TOP(op2); in sccp_visit_instr()
1685 if (ct_eval_fetch_obj(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1696 SKIP_IF_TOP(op2); in sccp_visit_instr()
1698 if (ct_eval_isset_obj(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1741 SKIP_IF_TOP(op2); in sccp_visit_instr()
1742 if (IS_PARTIAL_ARRAY(op2)) { in sccp_visit_instr()
1746 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1759 SKIP_IF_TOP(op2); in sccp_visit_instr()
1760 if (ct_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1779 name = CT_CONSTANT_EX(ctx->scdf.op_array, call->caller_init_opline->op2.constant); in sccp_visit_instr()
1840 SET_RESULT_BOT(op2); in sccp_visit_instr()
2321 opline->op2.constant = zend_optimizer_add_literal(op_array, value); in try_remove_definition()