Lines Matching refs:val

46 	zval val;  in zend_optimizer_collect_constant()  local
52 ZVAL_COPY(&val, value); in zend_optimizer_collect_constant()
53 zend_hash_add(ctx->constants, Z_STR_P(name), &val); in zend_optimizer_collect_constant()
194 zval *val; in zend_optimizer_get_collected_constant() local
196 if ((val = zend_hash_find(constants, Z_STR_P(name))) != NULL) { in zend_optimizer_get_collected_constant()
197 ZVAL_COPY(value, val); in zend_optimizer_get_collected_constant()
227 static inline void drop_leading_backslash(zval *val) { in drop_leading_backslash() argument
228 if (Z_STRVAL_P(val)[0] == '\\') { in drop_leading_backslash() local
229 zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); in drop_leading_backslash()
230 zval_ptr_dtor_nogc(val); in drop_leading_backslash()
231 ZVAL_STR(val, str); in drop_leading_backslash()
241 #define REQUIRES_STRING(val) do { \ argument
242 if (Z_TYPE_P(val) != IS_STRING) { \
247 #define TO_STRING_NOWARN(val) do { \ argument
248 if (Z_TYPE_P(val) >= IS_ARRAY) { \
251 convert_to_string(val); \
256 zval *val) in zend_optimizer_update_op1_const() argument
262 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op1_const()
277 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
278 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
279 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
281 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
284 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
285 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
286 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
288 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
291 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
292 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
293 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
295 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
298 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
299 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
300 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
304 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
307 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
308 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
309 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
313 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
322 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
323 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
331 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
332 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
341 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
362 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
368 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
381 zval *val) in zend_optimizer_update_op2_const() argument
396 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
397 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
398 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
399 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
404 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
405 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
406 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
407 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
410 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
411 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
412 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
413 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
423 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
424 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
425 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
426 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
432 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
433 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
434 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
435 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
441 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
442 if (Z_REFCOUNT_P(val) == 1) { in zend_optimizer_update_op2_const()
443 zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val)); in zend_optimizer_update_op2_const()
445 ZVAL_STR(&tmp, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
446 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op2_const()
447 val = &tmp; in zend_optimizer_update_op2_const()
449 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
453 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
454 if (zend_memrchr(Z_STRVAL_P(val), ':', Z_STRLEN_P(val))) { in zend_optimizer_update_op2_const()
458 if (zend_optimizer_classify_function(Z_STR_P(val), opline->extended_value)) { in zend_optimizer_update_op2_const()
465 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
466 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
467 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
470 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
474 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
475 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
476 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
480 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
481 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
482 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
499 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
500 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
504 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
505 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
521 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
522 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
525 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
528 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
531 zend_string_hash_val(Z_STR_P(val)); in zend_optimizer_update_op2_const()
532 zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
537 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
539 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
553 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
556 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
559 zend_string_hash_val(Z_STR_P(val)); in zend_optimizer_update_op2_const()
560 zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
565 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
569 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
571 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
572 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op2_const()
573 ZVAL_LONG(val, index); in zend_optimizer_update_op2_const()
576 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
583 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
589 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
702 zval *val) in zend_optimizer_replace_by_const() argument
750 ZVAL_COPY(&v, val); in zend_optimizer_replace_by_const()
762 zval_ptr_dtor_nogc(val); in zend_optimizer_replace_by_const()
784 zval_ptr_dtor_nogc(val); in zend_optimizer_replace_by_const()
808 ZVAL_COPY(&v, val); in zend_optimizer_replace_by_const()
822 zval_ptr_dtor_nogc(val); in zend_optimizer_replace_by_const()
830 || !ZEND_SAME_FAKE_TYPE(ZEND_TYPE_CODE(ret_info->type), Z_TYPE_P(val)) in zend_optimizer_replace_by_const()
847 if (zend_optimizer_update_op1_const(op_array, opline, val)) { in zend_optimizer_replace_by_const()
856 if (zend_optimizer_update_op2_const(op_array, opline, val)) { in zend_optimizer_replace_by_const()