summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2012-12-25 10:23:08 +0400
committerDmitry Stogov <dmitry@zend.com>2012-12-25 10:23:08 +0400
commit3f8c729e693c432b438cd33679182260d8732e30 (patch)
tree685b406e52f3a30d1a6cdfd5939a9d0cf0002df1 /Zend/zend_opcode.c
parent3f0dcc08e0bd748b8ea6c6d8d2e6245515e014d5 (diff)
downloadphp-git-3f8c729e693c432b438cd33679182260d8732e30.tar.gz
Traits refactoring
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index 4c6a784a88..65fa85185e 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -215,12 +215,6 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
void _destroy_zend_class_traits_info(zend_class_entry *ce)
{
if (ce->num_traits > 0 && ce->traits) {
- size_t i;
- for (i = 0; i < ce->num_traits; i++) {
- if (ce->traits[i]) {
- destroy_zend_class(&ce->traits[i]);
- }
- }
efree(ce->traits);
}
@@ -267,15 +261,6 @@ void _destroy_zend_class_traits_info(zend_class_entry *ce)
}
}
-static int zend_clear_trait_method_name(zend_op_array *op_array TSRMLS_DC)
-{
- if (op_array->function_name && (op_array->fn_flags & ZEND_ACC_ALIAS) == 0) {
- efree(op_array->function_name);
- op_array->function_name = NULL;
- }
- return 0;
-}
-
ZEND_API void destroy_zend_class(zend_class_entry **pce)
{
zend_class_entry *ce = *pce;
@@ -307,10 +292,6 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce)
}
zend_hash_destroy(&ce->properties_info);
str_efree(ce->name);
- if ((ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
- TSRMLS_FETCH();
- zend_hash_apply(&ce->function_table, (apply_func_t)zend_clear_trait_method_name TSRMLS_CC);
- }
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->constants_table);
if (ce->num_interfaces > 0 && ce->interfaces) {
@@ -400,7 +381,7 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
}
efree(op_array->opcodes);
- if (op_array->function_name && (op_array->fn_flags & ZEND_ACC_ALIAS) == 0) {
+ if (op_array->function_name) {
efree((char*)op_array->function_name);
}
if (op_array->doc_comment) {