Lines Matching refs:val

205 	zval *val;  in zend_optimizer_get_collected_constant()  local
207 if ((val = zend_hash_find(constants, Z_STR_P(name))) != NULL) { in zend_optimizer_get_collected_constant()
208 ZVAL_COPY(value, val); in zend_optimizer_get_collected_constant()
250 static inline void drop_leading_backslash(zval *val) { in drop_leading_backslash() argument
251 if (Z_STRVAL_P(val)[0] == '\\') { in drop_leading_backslash() local
252 zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); in drop_leading_backslash()
253 zval_ptr_dtor_nogc(val); in drop_leading_backslash()
254 ZVAL_STR(val, str); in drop_leading_backslash()
264 #define REQUIRES_STRING(val) do { \ argument
265 if (Z_TYPE_P(val) != IS_STRING) { \
270 #define TO_STRING_NOWARN(val) do { \ argument
271 if (Z_TYPE_P(val) >= IS_ARRAY) { \
274 convert_to_string(val); \
279 zval *val) in zend_optimizer_update_op1_const() argument
288 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
293 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op1_const()
311 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
312 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
313 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
315 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
318 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
319 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
320 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
322 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
325 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
326 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
327 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
329 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
332 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
333 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
334 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
338 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
341 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
342 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
343 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
347 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
368 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
369 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
378 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
382 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
386 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
398 if (Z_TYPE_P(val) != IS_STRING && zend_optimizer_eval_cast(&zv, IS_STRING, val) == SUCCESS) { in zend_optimizer_update_op1_const()
399 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op1_const()
400 val = &zv; in zend_optimizer_update_op1_const()
402 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
403 if (Z_TYPE_P(val) == IS_STRING && Z_STRLEN_P(val) == 0) { in zend_optimizer_update_op1_const()
421 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
427 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
440 zval *val) in zend_optimizer_update_op2_const() argument
450 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
451 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
452 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
453 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
457 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
458 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
459 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
460 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
478 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
479 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
480 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
481 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
487 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
488 if (Z_REFCOUNT_P(val) == 1) { in zend_optimizer_update_op2_const()
489 zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val)); in zend_optimizer_update_op2_const()
491 ZVAL_STR(&tmp, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
492 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op2_const()
493 val = &tmp; in zend_optimizer_update_op2_const()
495 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
499 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
500 if (zend_memrchr(Z_STRVAL_P(val), ':', Z_STRLEN_P(val))) { in zend_optimizer_update_op2_const()
504 if (zend_optimizer_classify_function(Z_STR_P(val), opline->extended_value)) { in zend_optimizer_update_op2_const()
511 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
512 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
513 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
516 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
520 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
521 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
522 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
526 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
527 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
528 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
546 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
547 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
551 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
552 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
557 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
558 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
573 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
576 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
579 zend_string_hash_val(Z_STR_P(val)); in zend_optimizer_update_op2_const()
580 zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
585 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
589 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
591 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
592 zval_ptr_dtor_nogc(val); in zend_optimizer_update_op2_const()
593 ZVAL_LONG(val, index); in zend_optimizer_update_op2_const()
596 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
603 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
609 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
624 zval *val) in zend_optimizer_replace_by_const() argument
659 Z_TRY_ADDREF_P(val); in zend_optimizer_replace_by_const()
660 if (!zend_optimizer_update_op1_const(op_array, opline, val)) { in zend_optimizer_replace_by_const()
661 zval_ptr_dtor(val); in zend_optimizer_replace_by_const()
670 zval_ptr_dtor_nogc(val); in zend_optimizer_replace_by_const()
675 if (!ZEND_TYPE_CONTAINS_CODE(ret_info->type, Z_TYPE_P(val)) in zend_optimizer_replace_by_const()
692 return zend_optimizer_update_op1_const(op_array, opline, val); in zend_optimizer_replace_by_const()
697 return zend_optimizer_update_op2_const(op_array, opline, val); in zend_optimizer_replace_by_const()