Lines Matching refs:val

46 	zval val;  in zend_optimizer_collect_constant()  local
52 ZVAL_DUP(&val, value); in zend_optimizer_collect_constant()
53 zend_hash_add(ctx->constants, Z_STR_P(name), &val); in zend_optimizer_collect_constant()
58 zval *val; in zend_optimizer_get_collected_constant() local
60 if ((val = zend_hash_find(constants, Z_STR_P(name))) != NULL) { in zend_optimizer_get_collected_constant()
61 ZVAL_DUP(value, val); in zend_optimizer_get_collected_constant()
131 static inline void drop_leading_backslash(zval *val) { in drop_leading_backslash() argument
132 if (Z_STRVAL_P(val)[0] == '\\') { in drop_leading_backslash() local
133 zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); in drop_leading_backslash()
134 zval_dtor(val); in drop_leading_backslash()
135 ZVAL_STR(val, str); in drop_leading_backslash()
148 #define REQUIRES_STRING(val) do { \ argument
149 if (Z_TYPE_P(val) != IS_STRING) { \
150 zval_dtor(val); \
155 #define TO_STRING_NOWARN(val) do { \ argument
156 if (Z_TYPE_P(val) >= IS_ARRAY) { \
157 zval_dtor(val); \
160 convert_to_string(val); \
165 zval *val) in zend_optimizer_update_op1_const() argument
170 zval_dtor(val); in zend_optimizer_update_op1_const()
178 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
179 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
180 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
182 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
190 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
191 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
196 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
201 zval_ptr_dtor(val); in zend_optimizer_update_op1_const()
206 zval_ptr_dtor(val); in zend_optimizer_update_op1_const()
216 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
219 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
232 zval *val) in zend_optimizer_update_op2_const() argument
237 zval_dtor(val); in zend_optimizer_update_op2_const()
253 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
254 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
255 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
256 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
260 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
261 zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val)); in zend_optimizer_update_op2_const()
262 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
266 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
267 if (zend_memrchr(Z_STRVAL_P(val), ':', Z_STRLEN_P(val))) { in zend_optimizer_update_op2_const()
268 zval_dtor(val); in zend_optimizer_update_op2_const()
272 if (zend_optimizer_classify_function(Z_STR_P(val), opline->extended_value)) { in zend_optimizer_update_op2_const()
275 zval_dtor(val); in zend_optimizer_update_op2_const()
280 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
281 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
282 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
285 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
290 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
291 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
292 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
309 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
310 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
326 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
327 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
330 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
345 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
347 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
348 zval_dtor(val); in zend_optimizer_update_op2_const()
349 ZVAL_LONG(val, index); in zend_optimizer_update_op2_const()
352 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
359 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
362 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
418 zval *val) in zend_optimizer_replace_by_const() argument
433 zval_dtor(val); in zend_optimizer_replace_by_const()
444 zval_dtor(val); in zend_optimizer_replace_by_const()
464 zend_optimizer_update_op1_const(op_array, m, val); in zend_optimizer_replace_by_const()
489 zval_dtor(val); in zend_optimizer_replace_by_const()
506 ZVAL_COPY_VALUE(&old_val, val); in zend_optimizer_replace_by_const()
507 zval_copy_ctor(val); in zend_optimizer_replace_by_const()
508 zend_optimizer_update_op1_const(op_array, m, val); in zend_optimizer_replace_by_const()
509 ZVAL_COPY_VALUE(val, &old_val); in zend_optimizer_replace_by_const()
518 zval_dtor(val); in zend_optimizer_replace_by_const()
526 || !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(val)) in zend_optimizer_replace_by_const()
528 zval_dtor(val); in zend_optimizer_replace_by_const()
544 if (zend_optimizer_update_op1_const(op_array, opline, val)) { in zend_optimizer_replace_by_const()
553 if (zend_optimizer_update_op2_const(op_array, opline, val)) { in zend_optimizer_replace_by_const()