Lines Matching refs:val
37 zval val; in zend_optimizer_collect_constant() local
43 ZVAL_DUP(&val, value); in zend_optimizer_collect_constant()
44 zend_hash_add(ctx->constants, Z_STR_P(name), &val); in zend_optimizer_collect_constant()
49 zval *val; in zend_optimizer_get_collected_constant() local
51 if ((val = zend_hash_find(constants, Z_STR_P(name))) != NULL) { in zend_optimizer_get_collected_constant()
52 ZVAL_DUP(value, val); in zend_optimizer_get_collected_constant()
127 static inline void drop_leading_backslash(zval *val) { in drop_leading_backslash() argument
128 if (Z_STRVAL_P(val)[0] == '\\') { in drop_leading_backslash() local
129 zend_string *str = zend_string_init(Z_STRVAL_P(val) + 1, Z_STRLEN_P(val) - 1, 0); in drop_leading_backslash()
130 zval_dtor(val); in drop_leading_backslash()
131 ZVAL_STR(val, str); in drop_leading_backslash()
144 #define REQUIRES_STRING(val) do { \ argument
145 if (Z_TYPE_P(val) != IS_STRING) { \
146 zval_dtor(val); \
151 #define TO_STRING_NOWARN(val) do { \ argument
152 if (Z_TYPE_P(val) >= IS_ARRAY) { \
153 zval_dtor(val); \
156 convert_to_string(val); \
161 zval *val) in zend_optimizer_update_op1_const() argument
166 zval_dtor(val); in zend_optimizer_update_op1_const()
173 REQUIRES_STRING(val); in zend_optimizer_update_op1_const()
174 drop_leading_backslash(val); in zend_optimizer_update_op1_const()
175 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
177 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op1_const()
185 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
186 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
193 TO_STRING_NOWARN(val); in zend_optimizer_update_op1_const()
196 opline->op1.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op1_const()
209 zval *val) in zend_optimizer_update_op2_const() argument
213 zval_dtor(val); in zend_optimizer_update_op2_const()
229 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
230 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
231 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
232 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
236 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
237 zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val)); in zend_optimizer_update_op2_const()
238 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
242 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
243 if (zend_memrchr(Z_STRVAL_P(val), ':', Z_STRLEN_P(val))) { in zend_optimizer_update_op2_const()
244 zval_dtor(val); in zend_optimizer_update_op2_const()
249 drop_leading_backslash(val); in zend_optimizer_update_op2_const()
250 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
251 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
254 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
259 REQUIRES_STRING(val); in zend_optimizer_update_op2_const()
260 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
261 zend_optimizer_add_literal_string(op_array, zend_string_tolower(Z_STR_P(val))); in zend_optimizer_update_op2_const()
278 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
279 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
295 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
296 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
299 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
318 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
334 if (Z_TYPE_P(val) == IS_STRING) { in zend_optimizer_update_op2_const()
336 if (ZEND_HANDLE_NUMERIC(Z_STR_P(val), index)) { in zend_optimizer_update_op2_const()
337 zval_dtor(val); in zend_optimizer_update_op2_const()
338 ZVAL_LONG(val, index); in zend_optimizer_update_op2_const()
341 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
348 TO_STRING_NOWARN(val); in zend_optimizer_update_op2_const()
351 opline->op2.constant = zend_optimizer_add_literal(op_array, val); in zend_optimizer_update_op2_const()
366 zval *val) in zend_optimizer_replace_by_const() argument
381 zval_dtor(val); in zend_optimizer_replace_by_const()
394 zval_dtor(val); in zend_optimizer_replace_by_const()
419 zend_optimizer_update_op1_const(op_array, m, val); in zend_optimizer_replace_by_const()
443 zval_dtor(val); in zend_optimizer_replace_by_const()
454 ZVAL_COPY_VALUE(&old_val, val); in zend_optimizer_replace_by_const()
455 zval_copy_ctor(val); in zend_optimizer_replace_by_const()
456 zend_optimizer_update_op1_const(op_array, m, val); in zend_optimizer_replace_by_const()
457 ZVAL_COPY_VALUE(val, &old_val); in zend_optimizer_replace_by_const()
466 zval_dtor(val); in zend_optimizer_replace_by_const()
474 || !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(val)) in zend_optimizer_replace_by_const()
476 zval_dtor(val); in zend_optimizer_replace_by_const()
480 zend_optimizer_update_op1_const(op_array, opline + 1, val); in zend_optimizer_replace_by_const()
486 return zend_optimizer_update_op1_const(op_array, opline, val); in zend_optimizer_replace_by_const()
491 return zend_optimizer_update_op2_const(op_array, opline, val); in zend_optimizer_replace_by_const()
699 if (Z_TYPE(p->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
700 op_array = (zend_op_array*)Z_PTR(p->val); in zend_accel_script_optimize()
706 if (Z_TYPE(p->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
707 ce = (zend_class_entry*)Z_PTR(p->val); in zend_accel_script_optimize()
710 if (Z_TYPE(q->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
711 op_array = (zend_op_array*)Z_PTR(q->val); in zend_accel_script_optimize()
730 if (Z_TYPE(p->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
731 op_array = (zend_op_array*)Z_PTR(p->val); in zend_accel_script_optimize()
737 if (Z_TYPE(p->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
738 ce = (zend_class_entry*)Z_PTR(p->val); in zend_accel_script_optimize()
741 if (Z_TYPE(q->val) == IS_UNDEF) continue; in zend_accel_script_optimize()
742 op_array = (zend_op_array*)Z_PTR(q->val); in zend_accel_script_optimize()