Lines Matching refs:str

29 static zend_string* ZEND_FASTCALL zend_new_interned_string_permanent(zend_string *str);
30 static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string *str);
31 static zend_string* ZEND_FASTCALL zend_string_init_interned_permanent(const char *str, size_t size,…
32 static zend_string* ZEND_FASTCALL zend_string_init_interned_request(const char *str, size_t size, b…
47 ZEND_API zend_ulong ZEND_FASTCALL zend_string_hash_func(zend_string *str) in zend_string_hash_func() argument
49 return ZSTR_H(str) = zend_hash_func(ZSTR_VAL(str), ZSTR_LEN(str)); in zend_string_hash_func()
52 ZEND_API zend_ulong ZEND_FASTCALL zend_hash_func(const char *str, size_t len) in zend_hash_func() argument
54 return zend_inline_hash_func(str, len); in zend_hash_func()
59 zend_string *str = Z_STR_P(zv); in _str_dtor() local
60 pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); in _str_dtor()
64 #define _ZEND_STR_DSC(id, str) str, argument
82 zend_string *str; in zend_interned_strings_init() local
96 str = zend_string_alloc(sizeof("")-1, 1); in zend_interned_strings_init()
97 ZSTR_VAL(str)[0] = '\000'; in zend_interned_strings_init() local
98 zend_empty_string = zend_new_interned_string_permanent(str); in zend_interned_strings_init()
109 str = zend_string_init(known_strings[i], strlen(known_strings[i]), 1); in zend_interned_strings_init()
110 zend_known_strings[i] = zend_new_interned_string_permanent(str); in zend_interned_strings_init()
122 …e zend_string *zend_interned_string_ht_lookup_ex(zend_ulong h, const char *str, size_t size, HashT… in zend_interned_string_ht_lookup_ex() argument
133 if (!memcmp(ZSTR_VAL(p->key), str, size)) { in zend_interned_string_ht_lookup_ex()
143 static zend_always_inline zend_string *zend_interned_string_ht_lookup(zend_string *str, HashTable *… in zend_interned_string_ht_lookup() argument
145 zend_ulong h = ZSTR_H(str); in zend_interned_string_ht_lookup()
154 if ((p->h == h) && zend_string_equal_content(p->key, str)) { in zend_interned_string_ht_lookup()
165 static zend_always_inline zend_string *zend_add_interned_string(zend_string *str, HashTable *intern… in zend_add_interned_string() argument
169 GC_SET_REFCOUNT(str, 1); in zend_add_interned_string()
170 GC_ADD_FLAGS(str, IS_STR_INTERNED | flags); in zend_add_interned_string()
172 ZVAL_INTERNED_STR(&val, str); in zend_add_interned_string()
174 zend_hash_add_new(interned_strings, str, &val); in zend_add_interned_string()
176 return str; in zend_add_interned_string()
179 ZEND_API zend_string* ZEND_FASTCALL zend_interned_string_find_permanent(zend_string *str) in zend_interned_string_find_permanent() argument
181 zend_string_hash_val(str); in zend_interned_string_find_permanent()
182 return zend_interned_string_ht_lookup(str, &interned_strings_permanent); in zend_interned_string_find_permanent()
185 static zend_string* ZEND_FASTCALL zend_new_interned_string_permanent(zend_string *str) in zend_new_interned_string_permanent() argument
189 if (ZSTR_IS_INTERNED(str)) { in zend_new_interned_string_permanent()
190 return str; in zend_new_interned_string_permanent()
193 zend_string_hash_val(str); in zend_new_interned_string_permanent()
194 ret = zend_interned_string_ht_lookup(str, &interned_strings_permanent); in zend_new_interned_string_permanent()
196 zend_string_release(str); in zend_new_interned_string_permanent()
200 ZEND_ASSERT(GC_FLAGS(str) & GC_PERSISTENT); in zend_new_interned_string_permanent()
201 if (GC_REFCOUNT(str) > 1) { in zend_new_interned_string_permanent()
202 zend_ulong h = ZSTR_H(str); in zend_new_interned_string_permanent()
203 zend_string_delref(str); in zend_new_interned_string_permanent()
204 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 1); in zend_new_interned_string_permanent()
205 ZSTR_H(str) = h; in zend_new_interned_string_permanent()
208 return zend_add_interned_string(str, &interned_strings_permanent, IS_STR_PERMANENT); in zend_new_interned_string_permanent()
211 static zend_string* ZEND_FASTCALL zend_new_interned_string_request(zend_string *str) in zend_new_interned_string_request() argument
215 if (ZSTR_IS_INTERNED(str)) { in zend_new_interned_string_request()
216 return str; in zend_new_interned_string_request()
219 zend_string_hash_val(str); in zend_new_interned_string_request()
222 ret = zend_interned_string_ht_lookup(str, &interned_strings_permanent); in zend_new_interned_string_request()
224 zend_string_release(str); in zend_new_interned_string_request()
228 ret = zend_interned_string_ht_lookup(str, &CG(interned_strings)); in zend_new_interned_string_request()
230 zend_string_release(str); in zend_new_interned_string_request()
239 ZEND_ASSERT(!(GC_FLAGS(str) & GC_PERSISTENT)); in zend_new_interned_string_request()
242 if (GC_REFCOUNT(str) > 1) { in zend_new_interned_string_request()
243 zend_ulong h = ZSTR_H(str); in zend_new_interned_string_request()
244 zend_string_delref(str); in zend_new_interned_string_request()
245 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 0); in zend_new_interned_string_request()
246 ZSTR_H(str) = h; in zend_new_interned_string_request()
249 ret = zend_add_interned_string(str, &CG(interned_strings), 0); in zend_new_interned_string_request()
254 static zend_string* ZEND_FASTCALL zend_string_init_interned_permanent(const char *str, size_t size,… in zend_string_init_interned_permanent() argument
257 zend_ulong h = zend_inline_hash_func(str, size); in zend_string_init_interned_permanent()
259 ret = zend_interned_string_ht_lookup_ex(h, str, size, &interned_strings_permanent); in zend_string_init_interned_permanent()
265 ret = zend_string_init(str, size, permanent); in zend_string_init_interned_permanent()
270 static zend_string* ZEND_FASTCALL zend_string_init_interned_request(const char *str, size_t size, b… in zend_string_init_interned_request() argument
273 zend_ulong h = zend_inline_hash_func(str, size); in zend_string_init_interned_request()
276 ret = zend_interned_string_ht_lookup_ex(h, str, size, &interned_strings_permanent); in zend_string_init_interned_request()
281 ret = zend_interned_string_ht_lookup_ex(h, str, size, &CG(interned_strings)); in zend_string_init_interned_request()
293 ret = zend_string_init(str, size, permanent); in zend_string_init_interned_request()