Lines Matching refs:op2
201 return CT_CONSTANT_EX(ctx->scdf.op_array, opline->op2.constant); in get_op2_value()
317 static inline zend_result ct_eval_binary_op(zval *result, zend_uchar binop, zval *op1, zval *op2) { in ct_eval_binary_op() argument
319 if (IS_PARTIAL_ARRAY(op1) || IS_PARTIAL_ARRAY(op2)) { in ct_eval_binary_op()
323 return zend_optimizer_eval_binary_op(result, binop, op1, op2); in ct_eval_binary_op()
358 static inline zend_result fetch_array_elem(zval **result, zval *op1, zval *op2) { in fetch_array_elem() argument
359 switch (Z_TYPE_P(op2)) { in fetch_array_elem()
370 *result = zend_hash_index_find(Z_ARR_P(op1), Z_LVAL_P(op2)); in fetch_array_elem()
373 zend_long lval = zend_dval_to_lval(Z_DVAL_P(op2)); in fetch_array_elem()
374 if (!zend_is_long_compatible(Z_DVAL_P(op2), lval)) { in fetch_array_elem()
381 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_array_elem()
388 static inline zend_result ct_eval_fetch_dim(zval *result, zval *op1, zval *op2, int support_strings… in ct_eval_fetch_dim() argument
391 if (fetch_array_elem(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_dim()
397 if (zval_to_string_offset(&index, op2) == FAILURE) { in ct_eval_fetch_dim()
425 …inline zend_result ct_eval_isset_dim(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_dim() argument
428 if (fetch_array_elem(&value, op1, op2) == FAILURE) { in ct_eval_isset_dim()
588 static inline zend_result fetch_obj_prop(zval **result, zval *op1, zval *op2) { in fetch_obj_prop() argument
589 switch (Z_TYPE_P(op2)) { in fetch_obj_prop()
591 *result = zend_symtable_find(Z_ARR_P(op1), Z_STR_P(op2)); in fetch_obj_prop()
598 static inline zend_result ct_eval_fetch_obj(zval *result, zval *op1, zval *op2) { in ct_eval_fetch_obj() argument
601 if (fetch_obj_prop(&value, op1, op2) == SUCCESS && value && !IS_BOT(value)) { in ct_eval_fetch_obj()
609 …inline zend_result ct_eval_isset_obj(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_isset_obj() argument
612 if (fetch_obj_prop(&value, op1, op2) == FAILURE) { in ct_eval_isset_obj()
692 … inline zend_result ct_eval_in_array(zval *result, uint32_t extended_value, zval *op1, zval *op2) { in ct_eval_in_array() argument
696 if (Z_TYPE_P(op2) != IS_ARRAY) { in ct_eval_in_array()
699 ht = Z_ARRVAL_P(op2); in ct_eval_in_array()
727 static inline zend_result ct_eval_array_key_exists(zval *result, zval *op1, zval *op2) { in ct_eval_array_key_exists() argument
730 if (Z_TYPE_P(op2) != IS_ARRAY && !IS_PARTIAL_ARRAY(op2)) { in ct_eval_array_key_exists()
736 if (fetch_array_elem(&value, op2, op1) == FAILURE) { in ct_eval_array_key_exists()
739 if (IS_PARTIAL_ARRAY(op2) && (!value || IS_BOT(value))) { in ct_eval_array_key_exists()
859 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
862 op2 = get_op2_value(ctx, opline, ssa_op); in sccp_visit_instr()
873 SET_RESULT(op1, op2); in sccp_visit_instr()
874 SET_RESULT(result, op2); in sccp_visit_instr()
894 if (op2) { in sccp_visit_instr()
895 SKIP_IF_TOP(op2); in sccp_visit_instr()
898 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
926 if (!op2) { in sccp_visit_instr()
929 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
948 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
952 } else if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
993 SKIP_IF_TOP(op2); in sccp_visit_instr()
995 if (IS_BOT(op2)) { in sccp_visit_instr()
1016 if (ct_eval_del_obj_prop(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1034 if (ct_eval_assign_obj(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1089 if (op2) { in sccp_visit_instr()
1090 SKIP_IF_TOP(op2); in sccp_visit_instr()
1101 if (op2 && IS_BOT(op2)) { in sccp_visit_instr()
1126 if (!op2) { in sccp_visit_instr()
1129 } else if (ct_eval_del_array_elem(&zv, op2) == SUCCESS) { in sccp_visit_instr()
1150 if (!op2 && IS_PARTIAL_ARRAY(&zv)) { in sccp_visit_instr()
1153 } else if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1210 SET_RESULT_BOT(op2); in sccp_visit_instr()
1217 if ((op1 && IS_BOT(op1)) || (op2 && IS_BOT(op2))) { in sccp_visit_instr()
1222 SET_RESULT_BOT(op2); in sccp_visit_instr()
1250 SKIP_IF_TOP(op2); in sccp_visit_instr()
1252 if (ct_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
1266 if (op2) { in sccp_visit_instr()
1267 SKIP_IF_TOP(op2); in sccp_visit_instr()
1270 if (ct_eval_binary_op(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1278 && ssa_op->op1_def >= 0 && op2) { in sccp_visit_instr()
1284 if (ct_eval_fetch_dim(&tmp, op1, op2, 0) == SUCCESS) { in sccp_visit_instr()
1287 ct_eval_del_array_elem(&zv, op2); in sccp_visit_instr()
1308 if (ct_eval_assign_dim(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1329 if (ct_eval_fetch_obj(&tmp, op1, op2) == SUCCESS) { in sccp_visit_instr()
1332 ct_eval_del_obj_prop(&zv, op2); in sccp_visit_instr()
1349 if (ct_eval_assign_obj(&zv, &tmp, op2) == SUCCESS) { in sccp_visit_instr()
1371 SKIP_IF_TOP(op2); in sccp_visit_instr()
1377 if (ct_eval_fetch_obj(&tmp1, op1, op2) == SUCCESS in sccp_visit_instr()
1381 ct_eval_assign_obj(&zv, &tmp2, op2); in sccp_visit_instr()
1490 SKIP_IF_TOP(op2); in sccp_visit_instr()
1491 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1500 SKIP_IF_TOP(op2); in sccp_visit_instr()
1501 if (ct_eval_array_key_exists(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1512 SKIP_IF_TOP(op2); in sccp_visit_instr()
1514 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST_R)) == SUCCESS) { in sccp_visit_instr()
1523 SKIP_IF_TOP(op2); in sccp_visit_instr()
1525 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1536 SKIP_IF_TOP(op2); in sccp_visit_instr()
1538 if (ct_eval_fetch_obj(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1549 SKIP_IF_TOP(op2); in sccp_visit_instr()
1551 if (ct_eval_isset_obj(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1581 SET_RESULT(result, op2); in sccp_visit_instr()
1604 SKIP_IF_TOP(op2); in sccp_visit_instr()
1605 if (IS_PARTIAL_ARRAY(op2)) { in sccp_visit_instr()
1609 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1622 SKIP_IF_TOP(op2); in sccp_visit_instr()
1623 if (ct_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1642 name = CT_CONSTANT_EX(ctx->scdf.op_array, call->caller_init_opline->op2.constant); in sccp_visit_instr()
1704 SET_RESULT_BOT(op2); in sccp_visit_instr()
1856 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in sccp_mark_feasible_successors()
2274 opline->op2.constant = zend_optimizer_add_literal(op_array, value); in try_remove_definition()