Lines Matching refs:zv

85 #define IS_TOP(zv) (Z_TYPE_P(zv) == TOP)  argument
86 #define IS_BOT(zv) (Z_TYPE_P(zv) == BOT) argument
88 #define MAKE_TOP(zv) (Z_TYPE_INFO_P(zv) = TOP) argument
89 #define MAKE_BOT(zv) (Z_TYPE_INFO_P(zv) = BOT) argument
91 static inline zend_bool value_known(zval *zv) { in value_known() argument
92 return !IS_TOP(zv) && !IS_BOT(zv); in value_known()
235 zval zv; in try_replace_op1() local
236 ZVAL_COPY(&zv, value); in try_replace_op1()
237 if (zend_optimizer_update_op1_const(ctx->scdf.op_array, opline, &zv)) { in try_replace_op1()
244 if (zend_is_true(&zv)) { in try_replace_op1()
269 if (zend_is_true(&zv)) { in try_replace_op1()
294 if (zend_is_true(&zv)) { in try_replace_op1()
333 if (Z_TYPE(zv) == IS_STRING) { in try_replace_op1()
334 zend_string_hash_val(Z_STR(zv)); in try_replace_op1()
336 opline->op1.constant = zend_optimizer_add_literal(ctx->scdf.op_array, &zv); in try_replace_op1()
340 zval_ptr_dtor_nogc(&zv); in try_replace_op1()
349 zval zv; in try_replace_op2() local
350 ZVAL_COPY(&zv, value); in try_replace_op2()
351 if (zend_optimizer_update_op2_const(ctx->scdf.op_array, opline, &zv)) { in try_replace_op2()
354 zval_ptr_dtor_nogc(&zv); in try_replace_op2()
860 #define SET_RESULT(op, zv) do { \ argument
862 set_value(scdf, ctx, ssa_op->op##_def, zv); \
872 zval *op1, *op2, zv; /* zv is a temporary to hold result values */ in sccp_visit_instr() local
897 ZVAL_FALSE(&zv); in sccp_visit_instr()
898 SET_RESULT(result, &zv); in sccp_visit_instr()
902 ZVAL_TRUE(&zv); in sccp_visit_instr()
903 SET_RESULT(result, &zv); in sccp_visit_instr()
969 if (zend_optimizer_eval_binary_op(&zv, opline->opcode, op1, op2) == SUCCESS) { in sccp_visit_instr()
970 SET_RESULT(result, &zv); in sccp_visit_instr()
971 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
998 …if (zend_optimizer_eval_binary_op(&zv, zend_compound_assign_to_binary_op(opline->opcode), op1, op2… in sccp_visit_instr()
999 SET_RESULT(op1, &zv); in sccp_visit_instr()
1000 SET_RESULT(result, &zv); in sccp_visit_instr()
1001 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1010 if (ct_eval_incdec(&zv, opline->opcode, op1) == SUCCESS) { in sccp_visit_instr()
1011 SET_RESULT(op1, &zv); in sccp_visit_instr()
1012 SET_RESULT(result, &zv); in sccp_visit_instr()
1013 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1023 if (ct_eval_incdec(&zv, opline->opcode, op1) == SUCCESS) { in sccp_visit_instr()
1024 SET_RESULT(op1, &zv); in sccp_visit_instr()
1025 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1033 if (zend_optimizer_eval_unary_op(&zv, opline->opcode, op1) == SUCCESS) { in sccp_visit_instr()
1034 SET_RESULT(result, &zv); in sccp_visit_instr()
1035 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1042 if (zend_optimizer_eval_cast(&zv, opline->extended_value, op1) == SUCCESS) { in sccp_visit_instr()
1043 SET_RESULT(result, &zv); in sccp_visit_instr()
1044 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1053 ZVAL_BOOL(&zv, zend_is_true(op1)); in sccp_visit_instr()
1054 SET_RESULT(result, &zv); in sccp_visit_instr()
1058 if (zend_optimizer_eval_strlen(&zv, op1) == SUCCESS) { in sccp_visit_instr()
1059 SET_RESULT(result, &zv); in sccp_visit_instr()
1060 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1068 ZVAL_LONG(&zv, zend_hash_num_elements(Z_ARRVAL_P(op1))); in sccp_visit_instr()
1069 SET_RESULT(result, &zv); in sccp_visit_instr()
1070 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1078 if (ct_eval_in_array(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1079 SET_RESULT(result, &zv); in sccp_visit_instr()
1080 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1091 if (ct_eval_fetch_dim(&zv, op1, op2, (opline->opcode != ZEND_FETCH_LIST)) == SUCCESS) { in sccp_visit_instr()
1092 SET_RESULT(result, &zv); in sccp_visit_instr()
1093 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1102 if (ct_eval_isset_dim(&zv, opline->extended_value, op1, op2) == SUCCESS) { in sccp_visit_instr()
1103 SET_RESULT(result, &zv); in sccp_visit_instr()
1104 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1123 if (ct_eval_isset_isempty(&zv, opline->extended_value, op1) == SUCCESS) { in sccp_visit_instr()
1124 SET_RESULT(result, &zv); in sccp_visit_instr()
1125 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1132 ct_eval_type_check(&zv, opline->extended_value, op1); in sccp_visit_instr()
1133 SET_RESULT(result, &zv); in sccp_visit_instr()
1134 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1138 ZVAL_FALSE(&zv); in sccp_visit_instr()
1139 SET_RESULT(result, &zv); in sccp_visit_instr()
1143 if (zend_optimizer_eval_cast(&zv, IS_STRING, op2) == SUCCESS) { in sccp_visit_instr()
1144 SET_RESULT(result, &zv); in sccp_visit_instr()
1145 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1157 if (zend_optimizer_eval_binary_op(&zv, ZEND_CONCAT, op1, op2) == SUCCESS) { in sccp_visit_instr()
1158 SET_RESULT(result, &zv); in sccp_visit_instr()
1159 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1196 ZVAL_COPY_VALUE(&zv, result); in sccp_visit_instr()
1199 array_init(&zv); in sccp_visit_instr()
1202 if (ct_eval_add_array_elem(&zv, op1, op2) == SUCCESS) { in sccp_visit_instr()
1203 SET_RESULT(result, &zv); in sccp_visit_instr()
1204 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1208 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1226 ZVAL_DUP(&zv, op1); in sccp_visit_instr()
1227 if (ct_eval_assign_dim(&zv, data, op2) == SUCCESS) { in sccp_visit_instr()
1229 SET_RESULT(op1, &zv); in sccp_visit_instr()
1230 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1235 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()
1287 if (ct_eval_func_call(&zv, Z_STR_P(name), call->num_args, args) == SUCCESS) { in sccp_visit_instr()
1288 SET_RESULT(result, &zv); in sccp_visit_instr()
1289 zval_ptr_dtor_nogc(&zv); in sccp_visit_instr()