Lines Matching refs:ce
152 static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC) in cleanup_user_class_data()
157 if (ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS) { in cleanup_user_class_data()
158 zend_hash_apply(&ce->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC); in cleanup_user_class_data()
160 if (ce->static_members_table) { in cleanup_user_class_data()
163 for (i = 0; i < ce->default_static_members_count; i++) { in cleanup_user_class_data()
164 if (ce->static_members_table[i]) { in cleanup_user_class_data()
165 zval *p = ce->static_members_table[i]; in cleanup_user_class_data()
166 ce->static_members_table[i] = NULL; in cleanup_user_class_data()
170 ce->static_members_table = NULL; in cleanup_user_class_data()
174 static inline void cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC) in cleanup_internal_class_data()
176 if (CE_STATIC_MEMBERS(ce)) { in cleanup_internal_class_data()
179 for (i = 0; i < ce->default_static_members_count; i++) { in cleanup_internal_class_data()
180 zval_ptr_dtor(&CE_STATIC_MEMBERS(ce)[i]); in cleanup_internal_class_data()
182 efree(CE_STATIC_MEMBERS(ce)); in cleanup_internal_class_data()
184 CG(static_members_table)[(zend_intptr_t)(ce->static_members_table)] = NULL; in cleanup_internal_class_data()
186 ce->static_members_table = NULL; in cleanup_internal_class_data()
191 ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC) in zend_cleanup_internal_class_data()
193 cleanup_internal_class_data(ce TSRMLS_CC); in zend_cleanup_internal_class_data()
216 void _destroy_zend_class_traits_info(zend_class_entry *ce) in _destroy_zend_class_traits_info() argument
218 if (ce->num_traits > 0 && ce->traits) { in _destroy_zend_class_traits_info()
219 efree(ce->traits); in _destroy_zend_class_traits_info()
222 if (ce->trait_aliases) { in _destroy_zend_class_traits_info()
224 while (ce->trait_aliases[i]) { in _destroy_zend_class_traits_info()
225 if (ce->trait_aliases[i]->trait_method) { in _destroy_zend_class_traits_info()
226 if (ce->trait_aliases[i]->trait_method->method_name) { in _destroy_zend_class_traits_info()
227 efree((char*)ce->trait_aliases[i]->trait_method->method_name); in _destroy_zend_class_traits_info()
229 if (ce->trait_aliases[i]->trait_method->class_name) { in _destroy_zend_class_traits_info()
230 efree((char*)ce->trait_aliases[i]->trait_method->class_name); in _destroy_zend_class_traits_info()
232 efree(ce->trait_aliases[i]->trait_method); in _destroy_zend_class_traits_info()
235 if (ce->trait_aliases[i]->alias) { in _destroy_zend_class_traits_info()
236 efree((char*)ce->trait_aliases[i]->alias); in _destroy_zend_class_traits_info()
239 efree(ce->trait_aliases[i]); in _destroy_zend_class_traits_info()
243 efree(ce->trait_aliases); in _destroy_zend_class_traits_info()
246 if (ce->trait_precedences) { in _destroy_zend_class_traits_info()
249 while (ce->trait_precedences[i]) { in _destroy_zend_class_traits_info()
250 efree((char*)ce->trait_precedences[i]->trait_method->method_name); in _destroy_zend_class_traits_info()
251 efree((char*)ce->trait_precedences[i]->trait_method->class_name); in _destroy_zend_class_traits_info()
252 efree(ce->trait_precedences[i]->trait_method); in _destroy_zend_class_traits_info()
254 if (ce->trait_precedences[i]->exclude_from_classes) { in _destroy_zend_class_traits_info()
255 efree(ce->trait_precedences[i]->exclude_from_classes); in _destroy_zend_class_traits_info()
258 efree(ce->trait_precedences[i]); in _destroy_zend_class_traits_info()
261 efree(ce->trait_precedences); in _destroy_zend_class_traits_info()
267 zend_class_entry *ce = *pce; in destroy_zend_class() local
269 if (--ce->refcount > 0) { in destroy_zend_class()
272 switch (ce->type) { in destroy_zend_class()
274 if (ce->default_properties_table) { in destroy_zend_class()
277 for (i = 0; i < ce->default_properties_count; i++) { in destroy_zend_class()
278 if (ce->default_properties_table[i]) { in destroy_zend_class()
279 zval_ptr_dtor(&ce->default_properties_table[i]); in destroy_zend_class()
282 efree(ce->default_properties_table); in destroy_zend_class()
284 if (ce->default_static_members_table) { in destroy_zend_class()
287 for (i = 0; i < ce->default_static_members_count; i++) { in destroy_zend_class()
288 if (ce->default_static_members_table[i]) { in destroy_zend_class()
289 zval_ptr_dtor(&ce->default_static_members_table[i]); in destroy_zend_class()
292 efree(ce->default_static_members_table); in destroy_zend_class()
294 zend_hash_destroy(&ce->properties_info); in destroy_zend_class()
295 str_efree(ce->name); in destroy_zend_class()
296 zend_hash_destroy(&ce->function_table); in destroy_zend_class()
297 zend_hash_destroy(&ce->constants_table); in destroy_zend_class()
298 if (ce->num_interfaces > 0 && ce->interfaces) { in destroy_zend_class()
299 efree(ce->interfaces); in destroy_zend_class()
301 if (ce->info.user.doc_comment) { in destroy_zend_class()
302 efree((char*)ce->info.user.doc_comment); in destroy_zend_class()
305 _destroy_zend_class_traits_info(ce); in destroy_zend_class()
307 efree(ce); in destroy_zend_class()
310 if (ce->default_properties_table) { in destroy_zend_class()
313 for (i = 0; i < ce->default_properties_count; i++) { in destroy_zend_class()
314 if (ce->default_properties_table[i]) { in destroy_zend_class()
315 zval_internal_ptr_dtor(&ce->default_properties_table[i]); in destroy_zend_class()
318 free(ce->default_properties_table); in destroy_zend_class()
320 if (ce->default_static_members_table) { in destroy_zend_class()
323 for (i = 0; i < ce->default_static_members_count; i++) { in destroy_zend_class()
324 zval_internal_ptr_dtor(&ce->default_static_members_table[i]); in destroy_zend_class()
326 free(ce->default_static_members_table); in destroy_zend_class()
328 zend_hash_destroy(&ce->properties_info); in destroy_zend_class()
329 str_free(ce->name); in destroy_zend_class()
330 zend_hash_destroy(&ce->function_table); in destroy_zend_class()
331 zend_hash_destroy(&ce->constants_table); in destroy_zend_class()
332 if (ce->num_interfaces > 0) { in destroy_zend_class()
333 free(ce->interfaces); in destroy_zend_class()
335 free(ce); in destroy_zend_class()
340 void zend_class_add_ref(zend_class_entry **ce) in zend_class_add_ref() argument
342 (*ce)->refcount++; in zend_class_add_ref()