diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-06-29 16:44:54 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-06-29 16:44:54 +0300 |
commit | 4bd22cf1c1d6a262fe2f026e082f2565433c53df (patch) | |
tree | 09a65791a35333a58320a3d872f12496d3a6aecd /Zend | |
parent | 667e9bd4177e40a52b4f0cd6bfed5737c2694a47 (diff) | |
download | php-git-4bd22cf1c1d6a262fe2f026e082f2565433c53df.tar.gz |
Improved zend_string API (Francois Laupretre)
Squashed commit of the following:
commit d96eab8d79b75ac83d49d49ae4665f948d15a804
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b3526439104ac7a89a8e0c79dbebf33b22bd01b8
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_API.c | 16 | ||||
-rw-r--r-- | Zend/zend_API.h | 12 | ||||
-rw-r--r-- | Zend/zend_ast.c | 2 | ||||
-rw-r--r-- | Zend/zend_compile.c | 8 | ||||
-rw-r--r-- | Zend/zend_exceptions.c | 2 | ||||
-rw-r--r-- | Zend/zend_execute.c | 6 | ||||
-rw-r--r-- | Zend/zend_hash.c | 2 | ||||
-rw-r--r-- | Zend/zend_hash.h | 6 | ||||
-rw-r--r-- | Zend/zend_language_parser.y | 4 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 8 | ||||
-rw-r--r-- | Zend/zend_operators.c | 4 | ||||
-rw-r--r-- | Zend/zend_smart_str.c | 6 | ||||
-rw-r--r-- | Zend/zend_string.c | 2 | ||||
-rw-r--r-- | Zend/zend_string.h | 140 | ||||
-rw-r--r-- | Zend/zend_types.h | 10 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 14 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 166 |
17 files changed, 220 insertions, 188 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index a1f4ef6618..f6e1d1f0da 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1644,7 +1644,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */ result = zend_symtable_update(ht, Z_STR_P(key), value); break; case IS_NULL: - result = zend_symtable_update(ht, STR_EMPTY_ALLOC(), value); + result = zend_symtable_update(ht, ZSTR_EMPTY_ALLOC(), value); break; case IS_RESOURCE: zend_error(E_NOTICE, "Resource ID#" ZEND_LONG_FMT " used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key)); @@ -2833,7 +2833,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache zend_string *lcname; ALLOCA_FLAG(use_heap); - STR_ALLOCA_ALLOC(lcname, name_len, use_heap); + ZSTR_ALLOCA_ALLOC(lcname, name_len, use_heap); zend_str_tolower_copy(lcname->val, name->val, name_len); *strict_class = 0; @@ -2904,7 +2904,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache } else { if (error) zend_spprintf(error, 0, "class '%.*s' not found", name_len, name->val); } - STR_ALLOCA_FREE(lcname, use_heap); + ZSTR_ALLOCA_FREE(lcname, use_heap); return ret; } /* }}} */ @@ -2934,7 +2934,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca /* Skip leading \ */ if (UNEXPECTED(Z_STRVAL_P(callable)[0] == '\\')) { - STR_ALLOCA_INIT(lmname, Z_STRVAL_P(callable) + 1, Z_STRLEN_P(callable) - 1, use_heap); + ZSTR_ALLOCA_INIT(lmname, Z_STRVAL_P(callable) + 1, Z_STRLEN_P(callable) - 1, use_heap); } else { lmname = Z_STR_P(callable); } @@ -2942,23 +2942,23 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca * This may be a compound name that includes namespace name */ if (EXPECTED((fcc->function_handler = zend_hash_find_ptr(EG(function_table), lmname)) != NULL)) { if (lmname != Z_STR_P(callable)) { - STR_ALLOCA_FREE(lmname, use_heap); + ZSTR_ALLOCA_FREE(lmname, use_heap); } return 1; } else { if (lmname == Z_STR_P(callable)) { - STR_ALLOCA_INIT(lmname, Z_STRVAL_P(callable), Z_STRLEN_P(callable), use_heap); + ZSTR_ALLOCA_INIT(lmname, Z_STRVAL_P(callable), Z_STRLEN_P(callable), use_heap); } else { zend_string_forget_hash_val(lmname); } zend_str_tolower(lmname->val, lmname->len); if ((fcc->function_handler = zend_hash_find_ptr(EG(function_table), lmname)) != NULL) { - STR_ALLOCA_FREE(lmname, use_heap); + ZSTR_ALLOCA_FREE(lmname, use_heap); return 1; } } if (lmname != Z_STR_P(callable)) { - STR_ALLOCA_FREE(lmname, use_heap); + ZSTR_ALLOCA_FREE(lmname, use_heap); } } diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 83e5265fd4..61e442b441 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -573,7 +573,7 @@ END_EXTERN_C() } while (0) #define ZVAL_EMPTY_STRING(z) do { \ - ZVAL_INTERNED_STR(z, STR_EMPTY_ALLOC()); \ + ZVAL_INTERNED_STR(z, ZSTR_EMPTY_ALLOC()); \ } while (0) #define ZVAL_PSTRINGL(z, s, l) do { \ @@ -1126,8 +1126,8 @@ static zend_always_inline int zend_parse_arg_string(zval *arg, char **dest, size *dest = NULL; *dest_len = 0; } else { - *dest = str->val; - *dest_len = str->len; + *dest = ZSTR_VAL(str); + *dest_len = ZSTR_LEN(str); } return 1; } @@ -1135,7 +1135,7 @@ static zend_always_inline int zend_parse_arg_string(zval *arg, char **dest, size static zend_always_inline int zend_parse_arg_path_str(zval *arg, zend_string **dest, int check_null) { if (!zend_parse_arg_str(arg, dest, check_null) || - (*dest && UNEXPECTED(CHECK_NULL_PATH((*dest)->val, (*dest)->len)))) { + (*dest && UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(*dest), ZSTR_LEN(*dest))))) { return 0; } return 1; @@ -1152,8 +1152,8 @@ static zend_always_inline int zend_parse_arg_path(zval *arg, char **dest, size_t *dest = NULL; *dest_len = 0; } else { - *dest = str->val; - *dest_len = str->len; + *dest = ZSTR_VAL(str); + *dest_len = ZSTR_LEN(str); } return 1; } diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index fe78bfd31b..7ecc4dfb73 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -188,7 +188,7 @@ static int zend_ast_add_array_element(zval *result, zval *offset, zval *expr) zval_dtor(offset); break; case IS_NULL: - zend_symtable_update(Z_ARRVAL_P(result), STR_EMPTY_ALLOC(), expr); + zend_symtable_update(Z_ARRVAL_P(result), ZSTR_EMPTY_ALLOC(), expr); break; case IS_LONG: zend_hash_index_update(Z_ARRVAL_P(result), Z_LVAL_P(offset), expr); diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index be70ff6643..e24c3ca9b3 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -413,7 +413,7 @@ static inline void zend_insert_literal(zend_op_array *op_array, zval *zv, int li if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { zend_string_hash_val(Z_STR_P(zv)); Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv)); - if (IS_INTERNED(Z_STR_P(zv))) { + if (ZSTR_IS_INTERNED(Z_STR_P(zv))) { Z_TYPE_FLAGS_P(zv) &= ~ (IS_TYPE_REFCOUNTED | IS_TYPE_COPYABLE); } } @@ -725,10 +725,10 @@ void *zend_hash_find_ptr_lc(HashTable *ht, const char *str, size_t len) { zend_string *lcname; ALLOCA_FLAG(use_heap); - STR_ALLOCA_ALLOC(lcname, len, use_heap); + ZSTR_ALLOCA_ALLOC(lcname, len, use_heap); zend_str_tolower_copy(lcname->val, str, len); result = zend_hash_find_ptr(ht, lcname); - STR_ALLOCA_FREE(lcname, use_heap); + ZSTR_ALLOCA_FREE(lcname, use_heap); return result; } @@ -5717,7 +5717,7 @@ static zend_bool zend_try_ct_eval_array(zval *result, zend_ast *ast) /* {{{ */ zend_hash_index_update(Z_ARRVAL_P(result), 1, value); break; case IS_NULL: - zend_hash_update(Z_ARRVAL_P(result), STR_EMPTY_ALLOC(), value); + zend_hash_update(Z_ARRVAL_P(result), ZSTR_EMPTY_ALLOC(), value); break; default: zend_error_noreturn(E_COMPILE_ERROR, "Illegal offset type"); diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 4140303332..43ad600a68 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -678,7 +678,7 @@ ZEND_METHOD(exception, __toString) DEFAULT_0_PARAMS; - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); exception = getThis(); ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 94636b52ee..79f3c8c20a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -573,9 +573,9 @@ ZEND_API char * zend_verify_internal_arg_class_kind(const zend_internal_arg_info zend_string *key; ALLOCA_FLAG(use_heap); - STR_ALLOCA_INIT(key, cur_arg_info->class_name, strlen(cur_arg_info->class_name), use_heap); + ZSTR_ALLOCA_INIT(key, cur_arg_info->class_name, strlen(cur_arg_info->class_name), use_heap); *pce = zend_fetch_class(key, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD)); - STR_ALLOCA_FREE(key, use_heap); + ZSTR_ALLOCA_FREE(key, use_heap); *class_name = (*pce) ? (*pce)->name->val : (char*)cur_arg_info->class_name; if (*pce && (*pce)->ce_flags & ZEND_ACC_INTERFACE) { @@ -1568,7 +1568,7 @@ str_index: } else { switch (Z_TYPE_P(dim)) { case IS_NULL: - offset_key = STR_EMPTY_ALLOC(); + offset_key = ZSTR_EMPTY_ALLOC(); goto str_index; case IS_DOUBLE: hval = zend_dval_to_lval(Z_DVAL_P(dim)); diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 0ff506a6f4..571c001d85 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -524,7 +524,7 @@ add_to_hash: zend_hash_iterators_update(ht, HT_INVALID_IDX, idx); p = ht->arData + idx; p->key = key; - if (!IS_INTERNED(key)) { + if (!ZSTR_IS_INTERNED(key)) { zend_string_addref(key); ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_hash_val(key); diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index e55ee9e61f..9d9ecfb85d 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -894,7 +894,7 @@ static zend_always_inline zval *_zend_hash_append(HashTable *ht, zend_string *ke Bucket *p = ht->arData + idx; ZVAL_COPY_VALUE(&p->val, zv); - if (!IS_INTERNED(key)) { + if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); zend_string_hash_val(key); @@ -916,7 +916,7 @@ static zend_always_inline zval *_zend_hash_append_ptr(HashTable *ht, zend_string Bucket *p = ht->arData + idx; ZVAL_PTR(&p->val, ptr); - if (!IS_INTERNED(key)) { + if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); zend_string_hash_val(key); @@ -938,7 +938,7 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string Bucket *p = ht->arData + idx; ZVAL_INDIRECT(&p->val, ptr); - if (!IS_INTERNED(key)) { + if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); zend_string_hash_val(key); diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 5dd700158d..39d89775d9 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -1014,7 +1014,7 @@ exit_expr: backticks_expr: /* empty */ - { $$ = zend_ast_create_zval_from_str(STR_EMPTY_ALLOC()); } + { $$ = zend_ast_create_zval_from_str(ZSTR_EMPTY_ALLOC()); } | T_ENCAPSED_AND_WHITESPACE { $$ = $1; } | encaps_list { $$ = $1; } ; @@ -1045,7 +1045,7 @@ scalar: | T_CLASS_C { $$ = zend_ast_create_ex(ZEND_AST_MAGIC_CONST, T_CLASS_C); } | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; } | T_START_HEREDOC T_END_HEREDOC - { $$ = zend_ast_create_zval_from_str(STR_EMPTY_ALLOC()); } + { $$ = zend_ast_create_zval_from_str(ZSTR_EMPTY_ALLOC()); } | '"' encaps_list '"' { $$ = $2; } | T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; } | dereferencable_scalar { $$ = $1; } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index f284ca4b31..61bd25c5c5 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1048,7 +1048,7 @@ ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend func->prototype = fbc; func->scope = fbc->common.scope; - func->filename = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.filename : STR_EMPTY_ALLOC(); + func->filename = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.filename : ZSTR_EMPTY_ALLOC(); func->line_start = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.line_start : 0; func->line_end = (fbc->type == ZEND_USER_FUNCTION)? fbc->op_array.line_end : 0; @@ -1084,13 +1084,13 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str use_heap = 0; #endif } else { - STR_ALLOCA_ALLOC(lc_method_name, method_name->len, use_heap); + ZSTR_ALLOCA_ALLOC(lc_method_name, method_name->len, use_heap); zend_str_tolower_copy(lc_method_name->val, method_name->val, method_name->len); } if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) { if (UNEXPECTED(!key)) { - STR_ALLOCA_FREE(lc_method_name, use_heap); + ZSTR_ALLOCA_FREE(lc_method_name, use_heap); } if (zobj->ce->__call) { return zend_get_user_call_function(zobj->ce, method_name); @@ -1149,7 +1149,7 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str } if (UNEXPECTED(!key)) { - STR_ALLOCA_FREE(lc_method_name, use_heap); + ZSTR_ALLOCA_FREE(lc_method_name, use_heap); } return fbc; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index d9670a5a49..8ceca62500 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -795,7 +795,7 @@ try_again: case IS_UNDEF: case IS_NULL: case IS_FALSE: - return STR_EMPTY_ALLOC(); + return ZSTR_EMPTY_ALLOC(); case IS_TRUE: return zend_string_init("1", 1, 0); case IS_RESOURCE: { @@ -830,7 +830,7 @@ try_again: zval_ptr_dtor(z); } zend_error(EG(exception) ? E_ERROR : E_RECOVERABLE_ERROR, "Object of class %s could not be converted to string", Z_OBJCE_P(op)->name->val); - return STR_EMPTY_ALLOC(); + return ZSTR_EMPTY_ALLOC(); } case IS_REFERENCE: op = Z_REFVAL_P(op); diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index d0d3689cd0..44b74a7489 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -19,7 +19,7 @@ #include <zend.h> #include "zend_smart_str_public.h" -#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _STR_HEADER_SIZE) +#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE) #ifndef SMART_STR_PAGE # define SMART_STR_PAGE 4096 @@ -42,7 +42,7 @@ ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len) str->s->len = 0; } else { str->a = SMART_STR_NEW_SIZE(len); - str->s = (zend_string *) erealloc2(str->s, _STR_HEADER_SIZE + str->a + 1, _STR_HEADER_SIZE + str->s->len + 1); + str->s = (zend_string *) erealloc2(str->s, _ZSTR_HEADER_SIZE + str->a + 1, _ZSTR_HEADER_SIZE + str->s->len + 1); } } @@ -56,6 +56,6 @@ ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len) str->s->len = 0; } else { str->a = SMART_STR_NEW_SIZE(len); - str->s = (zend_string *) realloc(str->s, _STR_HEADER_SIZE + str->a + 1); + str->s = (zend_string *) realloc(str->s, _ZSTR_HEADER_SIZE + str->a + 1); } } diff --git a/Zend/zend_string.c b/Zend/zend_string.c index f395d5c36c..3fde993bfe 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -83,7 +83,7 @@ static zend_string *zend_new_interned_string_int(zend_string *str) uint idx; Bucket *p; - if (IS_INTERNED(str)) { + if (ZSTR_IS_INTERNED(str)) { return str; } diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 0774646b2c..8349fd7703 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -35,31 +35,63 @@ void zend_interned_strings_dtor(void); END_EXTERN_C() -#define IS_INTERNED(s) (GC_FLAGS(s) & IS_STR_INTERNED) +/* Shortcuts */ -#define STR_EMPTY_ALLOC() CG(empty_string) +#define ZSTR_VAL(zstr) zend_string_get_val(zstr) +#define ZSTR_LEN(zstr) (zstr)->len +#define ZSTR_HASH(zstr) zend_string_hash_val(zstr) -#define _STR_HEADER_SIZE XtOffsetOf(zend_string, val) +/* Compatibility macros */ -#define STR_ALLOCA_ALLOC(str, _len, use_heap) do { \ - (str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + (_len) + 1), (use_heap)); \ +#define IS_INTERNED(s) ZSTR_IS_INTERNED(s) +#define STR_EMPTY_ALLOC() ZSTR_EMPTY_ALLOC() +#define _STR_HEADER_SIZE _ZSTR_HEADER_SIZE +#define STR_ALLOCA_ALLOC(str, _len, use_heap) ZSTR_ALLOCA_ALLOC(str, _len, use_heap) +#define STR_ALLOCA_INIT(str, s, len, use_heap) ZSTR_ALLOCA_INIT(str, s, len, use_heap) +#define STR_ALLOCA_FREE(str, use_heap) ZSTR_ALLOCA_FREE(str, use_heap) + +/*---*/ + +#define ZSTR_IS_INTERNED(s) (GC_FLAGS(s) & IS_STR_INTERNED) + +#define ZSTR_EMPTY_ALLOC() CG(empty_string) + +#define _ZSTR_HEADER_SIZE XtOffsetOf(zend_string, val) + +#define _ZSTR_STRUCT_SIZE(len) (_ZSTR_HEADER_SIZE + len + 1) + +#define ZSTR_ALLOCA_ALLOC(str, _len, use_heap) do { \ + (str) = (zend_string *)do_alloca(ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(_len)), (use_heap)); \ GC_REFCOUNT(str) = 1; \ GC_TYPE_INFO(str) = IS_STRING; \ - (str)->h = 0; \ - (str)->len = (_len); \ + zend_string_forget_hash_val(str); \ + zend_string_set_len(str, _len); \ } while (0) -#define STR_ALLOCA_INIT(str, s, len, use_heap) do { \ - STR_ALLOCA_ALLOC(str, len, use_heap); \ - memcpy((str)->val, (s), (len)); \ - (str)->val[(len)] = '\0'; \ + +#define ZSTR_ALLOCA_INIT(str, s, len, use_heap) do { \ + ZSTR_ALLOCA_ALLOC(str, len, use_heap); \ + memcpy(ZSTR_VAL(str), (s), (len)); \ + ZSTR_VAL(str)[(len)] = '\0'; \ } while (0) -#define STR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) +#define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) + +/*---*/ + +static zend_always_inline char * zend_string_get_val(zend_string *s) +{ + return s->val; +} + +static zend_always_inline void zend_string_set_len(zend_string *s, size_t len) +{ + s->len = len; +} static zend_always_inline zend_ulong zend_string_hash_val(zend_string *s) { if (!s->h) { - s->h = zend_hash_func(s->val, s->len); + s->h = zend_hash_func(ZSTR_VAL(s), ZSTR_LEN(s)); } return s->h; } @@ -69,9 +101,9 @@ static zend_always_inline void zend_string_forget_hash_val(zend_string *s) s->h = 0; } -static zend_always_inline uint32_t zend_string_refcount(zend_string *s) +static zend_always_inline uint32_t zend_string_refcount(const zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { return GC_REFCOUNT(s); } return 1; @@ -79,7 +111,7 @@ static zend_always_inline uint32_t zend_string_refcount(zend_string *s) static zend_always_inline uint32_t zend_string_addref(zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { return ++GC_REFCOUNT(s); } return 1; @@ -87,7 +119,7 @@ static zend_always_inline uint32_t zend_string_addref(zend_string *s) static zend_always_inline uint32_t zend_string_delref(zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { return --GC_REFCOUNT(s); } return 1; @@ -95,7 +127,7 @@ static zend_always_inline uint32_t zend_string_delref(zend_string *s) static zend_always_inline zend_string *zend_string_alloc(size_t len, int persistent) { - zend_string *ret = (zend_string *)pemalloc(ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + len + 1), persistent); + zend_string *ret = (zend_string *)pemalloc(ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); GC_REFCOUNT(ret) = 1; #if 1 @@ -106,14 +138,14 @@ static zend_always_inline zend_string *zend_string_alloc(size_t len, int persist GC_FLAGS(ret) = (persistent ? IS_STR_PERSISTENT : 0); GC_INFO(ret) = 0; #endif - ret->h = 0; - ret->len = len; + zend_string_forget_hash_val(ret); + zend_string_set_len(ret, len); return ret; } static zend_always_inline zend_string *zend_string_safe_alloc(size_t n, size_t m, size_t l, int persistent) { - zend_string *ret = (zend_string *)safe_pemalloc(n, m, ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + l + 1), persistent); + zend_string *ret = (zend_string *)safe_pemalloc(n, m, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(l)), persistent); GC_REFCOUNT(ret) = 1; #if 1 @@ -124,8 +156,8 @@ static zend_always_inline zend_string *zend_string_safe_alloc(size_t n, size_t m GC_FLAGS(ret) = (persistent ? IS_STR_PERSISTENT : 0); GC_INFO(ret) = 0; #endif - ret->h = 0; - ret->len = (n * m) + l; + zend_string_forget_hash_val(ret); + zend_string_set_len(ret, (n * m) + l); return ret; } @@ -133,14 +165,14 @@ static zend_always_inline zend_string *zend_string_init(const char *str, size_t { zend_string *ret = zend_string_alloc(len, persistent); - memcpy(ret->val, str, len); - ret->val[len] = '\0'; + memcpy(ZSTR_VAL(ret), str, len); + ZSTR_VAL(ret)[len] = '\0'; return ret; } static zend_always_inline zend_string *zend_string_copy(zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { GC_REFCOUNT(s)++; } return s; @@ -148,10 +180,10 @@ static zend_always_inline zend_string *zend_string_copy(zend_string *s) static zend_always_inline zend_string *zend_string_dup(zend_string *s, int persistent) { - if (IS_INTERNED(s)) { + if (ZSTR_IS_INTERNED(s)) { return s; } else { - return zend_string_init(s->val, s->len, persistent); + return zend_string_init(ZSTR_VAL(s), ZSTR_LEN(s), persistent); } } @@ -159,10 +191,10 @@ static zend_always_inline zend_string *zend_string_realloc(zend_string *s, size_ { zend_string *ret; - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { if (EXPECTED(GC_REFCOUNT(s) == 1)) { - ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + len + 1), persistent); - ret->len = len; + ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); + zend_string_set_len(ret, len); zend_string_forget_hash_val(ret); return ret; } else { @@ -170,7 +202,7 @@ static zend_always_inline zend_string *zend_string_realloc(zend_string *s, size_ } } ret = zend_string_alloc(len, persistent); - memcpy(ret->val, s->val, (len > s->len ? s->len : len) + 1); + memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), MIN(len, ZSTR_LEN(s)) + 1); return ret; } @@ -178,11 +210,11 @@ static zend_always_inline zend_string *zend_string_extend(zend_string *s, size_t { zend_string *ret; - ZEND_ASSERT(len >= s->len); - if (!IS_INTERNED(s)) { + ZEND_ASSERT(len >= ZSTR_LEN(s)); + if (!ZSTR_IS_INTERNED(s)) { if (EXPECTED(GC_REFCOUNT(s) == 1)) { - ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + len + 1), persistent); - ret->len = len; + ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); + zend_string_set_len(ret, len); zend_string_forget_hash_val(ret); return ret; } else { @@ -190,7 +222,7 @@ static zend_always_inline zend_string *zend_string_extend(zend_string *s, size_t } } ret = zend_string_alloc(len, persistent); - memcpy(ret->val, s->val, s->len + 1); + memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), ZSTR_LEN(s) + 1); return ret; } @@ -198,11 +230,11 @@ static zend_always_inline zend_string *zend_string_truncate(zend_string *s, size { zend_string *ret; - ZEND_ASSERT(len <= s->len); - if (!IS_INTERNED(s)) { + ZEND_ASSERT(len <= ZSTR_LEN(s)); + if (!ZSTR_IS_INTERNED(s)) { if (EXPECTED(GC_REFCOUNT(s) == 1)) { - ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + len + 1), persistent); - ret->len = len; + ret = (zend_string *)perealloc(s, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(len)), persistent); + zend_string_set_len(ret, len); zend_string_forget_hash_val(ret); return ret; } else { @@ -210,7 +242,7 @@ static zend_always_inline zend_string *zend_string_truncate(zend_string *s, size } } ret = zend_string_alloc(len, persistent); - memcpy(ret->val, s->val, len + 1); + memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), len + 1); return ret; } @@ -218,10 +250,10 @@ static zend_always_inline zend_string *zend_string_safe_realloc(zend_string *s, { zend_string *ret; - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { if (GC_REFCOUNT(s) == 1) { - ret = (zend_string *)safe_perealloc(s, n, m, ZEND_MM_ALIGNED_SIZE(_STR_HEADER_SIZE + l + 1), persistent); - ret->len = (n * m) + l; + ret = (zend_string *)safe_perealloc(s, n, m, ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(l)), persistent); + zend_string_set_len(ret, (n * m) + l); zend_string_forget_hash_val(ret); return ret; } else { @@ -229,13 +261,13 @@ static zend_always_inline zend_string *zend_string_safe_realloc(zend_string *s, } } ret = zend_string_safe_alloc(n, m, l, persistent); - memcpy(ret->val, s->val, ((n * m) + l > s->len ? s->len : ((n * m) + l)) + 1); + memcpy(ZSTR_VAL(ret), ZSTR_VAL(s), MIN((n * m) + l, ZSTR_LEN(s)) + 1); return ret; } static zend_always_inline void zend_string_free(zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { ZEND_ASSERT(GC_REFCOUNT(s) <= 1); pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT); } @@ -243,7 +275,7 @@ static zend_always_inline void zend_string_free(zend_string *s) static zend_always_inline void zend_string_release(zend_string *s) { - if (!IS_INTERNED(s)) { + if (!ZSTR_IS_INTERNED(s)) { if (--GC_REFCOUNT(s) == 0) { pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT); } @@ -253,17 +285,17 @@ static zend_always_inline void zend_string_release(zend_string *s) static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_string *s2) { - return s1 == s2 || (s1->len == s2->len && !memcmp(s1->val, s2->val, s1->len)); + return s1 == s2 || (ZSTR_LEN(s1) == ZSTR_LEN(s2) && !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1))); } #define zend_string_equals_ci(s1, s2) \ - ((s1)->len == (s2)->len && !zend_binary_strcasecmp((s1)->val, (s1)->len, (s2)->val, (s2)->len)) + (ZSTR_LEN(s1) == ZSTR_LEN(s2) && !zend_binary_strcasecmp(ZSTR_VAL(s1), ZSTR_LEN(s1), ZSTR_VAL(s2), ZSTR_LEN(s2))) #define zend_string_equals_literal_ci(str, c) \ - ((str)->len == sizeof(c) - 1 && !zend_binary_strcasecmp((str)->val, (str)->len, (c), sizeof(c) - 1)) + (ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), sizeof(c) - 1)) #define zend_string_equals_literal(str, literal) \ - ((str)->len == sizeof(literal)-1 && !memcmp((str)->val, literal, sizeof(literal) - 1)) + (ZSTR_LEN(str) == sizeof(literal)-1 && !memcmp(ZSTR_VAL(str), literal, sizeof(literal) - 1)) /* * DJBX33A (Daniel J. Bernstein, Times 33 with Addition) @@ -340,13 +372,13 @@ static zend_always_inline void zend_interned_empty_string_init(zend_string **s) zend_string *str; str = zend_string_alloc(sizeof("")-1, 1); - str->val[0] = '\000'; + ZSTR_VAL(str)[0] = '\000'; #ifndef ZTS *s = zend_new_interned_string(str); #else zend_string_hash_val(str); - str->gc.u.v.flags |= IS_STR_INTERNED; + GC_FLAGS(str) |= IS_STR_INTERNED; *s = str; #endif } diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 5eed487a33..7d7961cb10 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -495,13 +495,13 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) { #define Z_STR(zval) (zval).value.str #define Z_STR_P(zval_p) Z_STR(*(zval_p)) -#define Z_STRVAL(zval) Z_STR(zval)->val +#define Z_STRVAL(zval) ZSTR_VAL(Z_STR(zval)) #define Z_STRVAL_P(zval_p) Z_STRVAL(*(zval_p)) -#define Z_STRLEN(zval) Z_STR(zval)->len +#define Z_STRLEN(zval) ZSTR_LEN(Z_STR(zval)) #define Z_STRLEN_P(zval_p) Z_STRLEN(*(zval_p)) -#define Z_STRHASH(zval) Z_STR(zval)->h +#define Z_STRHASH(zval) ZSTR_HASH(Z_STR(zval)) #define Z_STRHASH_P(zval_p) Z_STRHASH(*(zval_p)) #define Z_ARR(zval) (zval).value.arr @@ -605,7 +605,7 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) { zend_string *__s = (s); \ Z_STR_P(__z) = __s; \ /* interned strings support */ \ - Z_TYPE_INFO_P(__z) = IS_INTERNED(__s) ? \ + Z_TYPE_INFO_P(__z) = ZSTR_IS_INTERNED(__s) ? \ IS_INTERNED_STRING_EX : \ IS_STRING_EX; \ } while (0) @@ -629,7 +629,7 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) { zend_string *__s = (s); \ Z_STR_P(__z) = __s; \ /* interned strings support */ \ - if (IS_INTERNED(__s)) { \ + if (ZSTR_IS_INTERNED(__s)) { \ Z_TYPE_INFO_P(__z) = IS_INTERNED_STRING_EX; \ } else { \ GC_REFCOUNT(__s)++; \ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index be9b012e8b..7060ccb3b5 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -279,7 +279,7 @@ ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV) } } if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -5271,7 +5271,7 @@ ZEND_VM_C_LABEL(num_index): offset = Z_REFVAL_P(offset); ZEND_VM_C_GOTO(add_again); } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index); } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -5284,7 +5284,7 @@ ZEND_VM_C_LABEL(num_index): ZEND_VM_C_GOTO(num_index); } else if (OP2_TYPE == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index); } else { zend_error(E_WARNING, "Illegal offset type"); @@ -5699,7 +5699,7 @@ ZEND_VM_C_LABEL(num_index_dim): hval = zend_dval_to_lval(Z_DVAL_P(offset)); ZEND_VM_C_GOTO(num_index_dim); } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index_dim); } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -5712,7 +5712,7 @@ ZEND_VM_C_LABEL(num_index_dim): ZEND_VM_C_GOTO(num_index_dim); } else if (OP2_TYPE == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index_dim); } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -6594,7 +6594,7 @@ ZEND_VM_C_LABEL(num_index_prop): hval = zend_dval_to_lval(Z_DVAL_P(offset)); ZEND_VM_C_GOTO(num_index_prop); } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index_prop); } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -6607,7 +6607,7 @@ ZEND_VM_C_LABEL(num_index_prop): ZEND_VM_C_GOTO(num_index_prop); } else if (OP2_TYPE == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); ZEND_VM_C_GOTO(str_index_prop); } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 180bcd18c3..7c9d9b7b4e 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4580,7 +4580,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLE } } if (IS_CONST != IS_CONST && IS_CONST != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -6091,7 +6091,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -6104,7 +6104,7 @@ num_index: goto num_index; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -6384,7 +6384,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -6397,7 +6397,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -7940,7 +7940,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -7953,7 +7953,7 @@ num_index: goto num_index; } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -8603,7 +8603,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(Z } } if (IS_CONST != IS_CONST && IS_CONST != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -9824,7 +9824,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -9837,7 +9837,7 @@ num_index: goto num_index; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -9930,7 +9930,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -9943,7 +9943,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -10478,7 +10478,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMPVAR_HANDL } } if (IS_CONST != IS_CONST && IS_CONST != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -11610,7 +11610,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -11623,7 +11623,7 @@ num_index: goto num_index; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -11716,7 +11716,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -11729,7 +11729,7 @@ num_index_prop: goto num_index_prop; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -13087,7 +13087,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -13100,7 +13100,7 @@ num_index: goto num_index; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -13817,7 +13817,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -13830,7 +13830,7 @@ num_index: goto num_index; } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -14371,7 +14371,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -14384,7 +14384,7 @@ num_index: goto num_index; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -14884,7 +14884,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -14897,7 +14897,7 @@ num_index: goto num_index; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -17980,7 +17980,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -17993,7 +17993,7 @@ num_index: goto num_index; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -18093,7 +18093,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -18106,7 +18106,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -19560,7 +19560,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -19573,7 +19573,7 @@ num_index: goto num_index; } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -21133,7 +21133,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -21146,7 +21146,7 @@ num_index: goto num_index; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -21246,7 +21246,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -21259,7 +21259,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -22710,7 +22710,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -22723,7 +22723,7 @@ num_index: goto num_index; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -22823,7 +22823,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -22836,7 +22836,7 @@ num_index_dim: goto num_index_dim; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -24212,7 +24212,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -24225,7 +24225,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -24348,7 +24348,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -24361,7 +24361,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -26493,7 +26493,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -26506,7 +26506,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -26629,7 +26629,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -26642,7 +26642,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -27985,7 +27985,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -27998,7 +27998,7 @@ num_index_dim: goto num_index_dim; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -28123,7 +28123,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -28136,7 +28136,7 @@ num_index_prop: goto num_index_prop; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -30276,7 +30276,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(Z } } if (IS_CV != IS_CONST && IS_CV != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -32377,7 +32377,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -32390,7 +32390,7 @@ num_index: goto num_index; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -32572,7 +32572,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -32585,7 +32585,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -32813,7 +32813,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -32826,7 +32826,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -34944,7 +34944,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -34957,7 +34957,7 @@ num_index: goto num_index; } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -35584,7 +35584,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND } } if (IS_CV != IS_CONST && IS_CV != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -37513,7 +37513,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -37526,7 +37526,7 @@ num_index: goto num_index; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -37626,7 +37626,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -37639,7 +37639,7 @@ num_index_dim: goto num_index_dim; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -37762,7 +37762,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -37775,7 +37775,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -38315,7 +38315,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMPVAR_HANDLER( } } if (IS_CV != IS_CONST && IS_CV != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -40120,7 +40120,7 @@ num_index: offset = Z_REFVAL_P(offset); goto add_again; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else if (Z_TYPE_P(offset) == IS_DOUBLE) { hval = zend_dval_to_lval(Z_DVAL_P(offset)); @@ -40133,7 +40133,7 @@ num_index: goto num_index; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index; } else { zend_error(E_WARNING, "Illegal offset type"); @@ -40233,7 +40233,7 @@ num_index_dim: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_dim; } else if (Z_TYPE_P(offset) == IS_NULL) { - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -40246,7 +40246,7 @@ num_index_dim: goto num_index_dim; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - key = STR_EMPTY_ALLOC(); + key = ZSTR_EMPTY_ALLOC(); goto str_index_dim; } else { zend_error(E_WARNING, "Illegal offset type in unset"); @@ -40371,7 +40371,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -40384,7 +40384,7 @@ num_index_prop: goto num_index_prop; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -41388,7 +41388,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDL } } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && (IS_TMP_VAR|IS_VAR) != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -42565,7 +42565,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -42578,7 +42578,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -43818,7 +43818,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_CV_HANDLER( } } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && (IS_TMP_VAR|IS_VAR) != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -44574,7 +44574,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -44587,7 +44587,7 @@ num_index_prop: goto num_index_prop; } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); @@ -44981,7 +44981,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_TMPVAR_TMPVAR_HAND } } if ((IS_TMP_VAR|IS_VAR) != IS_CONST && (IS_TMP_VAR|IS_VAR) != IS_CV && - !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { + !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) { size_t len = op1_str->len; str = zend_string_realloc(op1_str, len + op2_str->len, 0); @@ -45739,7 +45739,7 @@ num_index_prop: hval = zend_dval_to_lval(Z_DVAL_P(offset)); goto num_index_prop; } else if (Z_TYPE_P(offset) == IS_NULL) { - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else if (Z_TYPE_P(offset) == IS_FALSE) { hval = 0; @@ -45752,7 +45752,7 @@ num_index_prop: goto num_index_prop; } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) { GET_OP2_UNDEF_CV(offset, BP_VAR_R); - str = STR_EMPTY_ALLOC(); + str = ZSTR_EMPTY_ALLOC(); goto str_index_prop; } else { zend_error(E_WARNING, "Illegal offset type in isset or empty"); |