Lines Matching refs:ce
142 ZEND_API void zend_cleanup_user_class_data(zend_class_entry *ce) in zend_cleanup_user_class_data() argument
147 if (ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS) { in zend_cleanup_user_class_data()
150 ZEND_HASH_FOREACH_PTR(&ce->function_table, func) { in zend_cleanup_user_class_data()
156 if (ce->static_members_table) { in zend_cleanup_user_class_data()
157 zval *static_members = ce->static_members_table; in zend_cleanup_user_class_data()
159 zval *end = p + ce->default_static_members_count; in zend_cleanup_user_class_data()
162 ce->default_static_members_count = 0; in zend_cleanup_user_class_data()
163 ce->default_static_members_table = ce->static_members_table = NULL; in zend_cleanup_user_class_data()
172 ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce) in zend_cleanup_internal_class_data() argument
174 if (CE_STATIC_MEMBERS(ce)) { in zend_cleanup_internal_class_data()
175 zval *static_members = CE_STATIC_MEMBERS(ce); in zend_cleanup_internal_class_data()
177 zval *end = p + ce->default_static_members_count; in zend_cleanup_internal_class_data()
180 CG(static_members_table)[(zend_intptr_t)(ce->static_members_table)] = NULL; in zend_cleanup_internal_class_data()
182 ce->static_members_table = NULL; in zend_cleanup_internal_class_data()
184 ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED; in zend_cleanup_internal_class_data()
193 void _destroy_zend_class_traits_info(zend_class_entry *ce) in _destroy_zend_class_traits_info() argument
195 if (ce->num_traits > 0 && ce->traits) { in _destroy_zend_class_traits_info()
196 efree(ce->traits); in _destroy_zend_class_traits_info()
199 if (ce->trait_aliases) { in _destroy_zend_class_traits_info()
201 while (ce->trait_aliases[i]) { in _destroy_zend_class_traits_info()
202 if (ce->trait_aliases[i]->trait_method) { in _destroy_zend_class_traits_info()
203 if (ce->trait_aliases[i]->trait_method->method_name) { in _destroy_zend_class_traits_info()
204 zend_string_release(ce->trait_aliases[i]->trait_method->method_name); in _destroy_zend_class_traits_info()
206 if (ce->trait_aliases[i]->trait_method->class_name) { in _destroy_zend_class_traits_info()
207 zend_string_release(ce->trait_aliases[i]->trait_method->class_name); in _destroy_zend_class_traits_info()
209 efree(ce->trait_aliases[i]->trait_method); in _destroy_zend_class_traits_info()
212 if (ce->trait_aliases[i]->alias) { in _destroy_zend_class_traits_info()
213 zend_string_release(ce->trait_aliases[i]->alias); in _destroy_zend_class_traits_info()
216 efree(ce->trait_aliases[i]); in _destroy_zend_class_traits_info()
220 efree(ce->trait_aliases); in _destroy_zend_class_traits_info()
223 if (ce->trait_precedences) { in _destroy_zend_class_traits_info()
226 while (ce->trait_precedences[i]) { in _destroy_zend_class_traits_info()
227 zend_string_release(ce->trait_precedences[i]->trait_method->method_name); in _destroy_zend_class_traits_info()
228 zend_string_release(ce->trait_precedences[i]->trait_method->class_name); in _destroy_zend_class_traits_info()
229 efree(ce->trait_precedences[i]->trait_method); in _destroy_zend_class_traits_info()
231 if (ce->trait_precedences[i]->exclude_from_classes) { in _destroy_zend_class_traits_info()
233 zend_trait_precedence *cur_precedence = ce->trait_precedences[i]; in _destroy_zend_class_traits_info()
238 efree(ce->trait_precedences[i]->exclude_from_classes); in _destroy_zend_class_traits_info()
240 efree(ce->trait_precedences[i]); in _destroy_zend_class_traits_info()
243 efree(ce->trait_precedences); in _destroy_zend_class_traits_info()
250 zend_class_entry *ce = Z_PTR_P(zv); in destroy_zend_class() local
252 if (--ce->refcount > 0) { in destroy_zend_class()
255 switch (ce->type) { in destroy_zend_class()
257 if (ce->default_properties_table) { in destroy_zend_class()
258 zval *p = ce->default_properties_table; in destroy_zend_class()
259 zval *end = p + ce->default_properties_count; in destroy_zend_class()
265 efree(ce->default_properties_table); in destroy_zend_class()
267 if (ce->default_static_members_table) { in destroy_zend_class()
268 zval *p = ce->default_static_members_table; in destroy_zend_class()
269 zval *end = p + ce->default_static_members_count; in destroy_zend_class()
275 efree(ce->default_static_members_table); in destroy_zend_class()
277 ZEND_HASH_FOREACH_PTR(&ce->properties_info, prop_info) { in destroy_zend_class()
278 if (prop_info->ce == ce || (prop_info->flags & ZEND_ACC_SHADOW)) { in destroy_zend_class()
285 zend_hash_destroy(&ce->properties_info); in destroy_zend_class()
286 zend_string_release(ce->name); in destroy_zend_class()
287 zend_hash_destroy(&ce->function_table); in destroy_zend_class()
288 if (zend_hash_num_elements(&ce->constants_table)) { in destroy_zend_class()
291 ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) { in destroy_zend_class()
292 if (c->ce == ce) { in destroy_zend_class()
300 zend_hash_destroy(&ce->constants_table); in destroy_zend_class()
301 if (ce->num_interfaces > 0 && ce->interfaces) { in destroy_zend_class()
302 efree(ce->interfaces); in destroy_zend_class()
304 if (ce->info.user.doc_comment) { in destroy_zend_class()
305 zend_string_release(ce->info.user.doc_comment); in destroy_zend_class()
308 _destroy_zend_class_traits_info(ce); in destroy_zend_class()
312 if (ce->default_properties_table) { in destroy_zend_class()
313 zval *p = ce->default_properties_table; in destroy_zend_class()
314 zval *end = p + ce->default_properties_count; in destroy_zend_class()
320 free(ce->default_properties_table); in destroy_zend_class()
322 if (ce->default_static_members_table) { in destroy_zend_class()
323 zval *p = ce->default_static_members_table; in destroy_zend_class()
324 zval *end = p + ce->default_static_members_count; in destroy_zend_class()
330 free(ce->default_static_members_table); in destroy_zend_class()
332 zend_hash_destroy(&ce->properties_info); in destroy_zend_class()
333 zend_string_release(ce->name); in destroy_zend_class()
334 zend_hash_destroy(&ce->function_table); in destroy_zend_class()
335 if (zend_hash_num_elements(&ce->constants_table)) { in destroy_zend_class()
338 ZEND_HASH_FOREACH_PTR(&ce->constants_table, c) { in destroy_zend_class()
340 if (c->doc_comment && c->ce == ce) { in destroy_zend_class()
344 zend_hash_destroy(&ce->constants_table); in destroy_zend_class()
346 if (ce->num_interfaces > 0) { in destroy_zend_class()
347 free(ce->interfaces); in destroy_zend_class()
349 free(ce); in destroy_zend_class()
356 zend_class_entry *ce = Z_PTR_P(zv); in zend_class_add_ref() local
358 ce->refcount++; in zend_class_add_ref()