]> granicus.if.org Git - php/commitdiff
Remove the ZEND_ACC_CLONE flag
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 22 Apr 2017 13:44:24 +0000 (15:44 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 22 Apr 2017 13:47:53 +0000 (15:47 +0200)
This one is completely unused

Zend/zend_API.c
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_inheritance.c

index 926868d6a6df19f7068fa83d2f8dddeed41ae67b..0274a288b693191f40a738da699d1f062d6e4d1d 100644 (file)
@@ -2381,7 +2381,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
                        dtor->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
                }
                if (clone) {
-                       clone->common.fn_flags |= ZEND_ACC_CLONE;
                        if (clone->common.fn_flags & ZEND_ACC_STATIC) {
                                zend_error(error_type, "Constructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(clone->common.function_name));
                        }
index 09fd99ea31f90aa33d4ea9c39c6673c90c896fd3..35b15b3aefb14b9ef800cf4afacec1f054e9e3e5 100644 (file)
@@ -6146,7 +6146,6 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
                }
        }
        if (ce->clone) {
-               ce->clone->common.fn_flags |= ZEND_ACC_CLONE;
                if (ce->clone->common.fn_flags & ZEND_ACC_STATIC) {
                        zend_error_noreturn(E_COMPILE_ERROR, "Clone method %s::%s() cannot be static",
                                ZSTR_VAL(ce->name), ZSTR_VAL(ce->clone->common.function_name));
index 742a102391d2e83d1d2c48086465d71ada434e3a..370a57a1d773bdd5f6218faee7d77f5e81f239a5 100644 (file)
@@ -205,6 +205,7 @@ typedef struct _zend_oparray_context {
  * Free flags:
  * 0x10
  * 0x20
+ * 0x8000
  * 0x2000000
  */
 
@@ -227,7 +228,6 @@ typedef struct _zend_oparray_context {
 /* method flags (special method detection) */
 #define ZEND_ACC_CTOR          0x2000
 #define ZEND_ACC_DTOR          0x4000
-#define ZEND_ACC_CLONE         0x8000
 
 /* method flag used by Closure::__invoke() */
 #define ZEND_ACC_USER_ARG_INFO 0x80
index 5b5c9756e38305ab385240783c91f17f28d94a9b..71b3eb06dad07a37e49ca34bee1b27b500994ea4 100644 (file)
@@ -1103,7 +1103,7 @@ static zend_bool zend_traits_method_compatibility_check(zend_function *fn, zend_
 static void zend_add_magic_methods(zend_class_entry* ce, zend_string* mname, zend_function* fe) /* {{{ */
 {
        if (zend_string_equals_literal(mname, ZEND_CLONE_FUNC_NAME)) {
-               ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
+               ce->clone = fe;
        } else if (zend_string_equals_literal(mname, ZEND_CONSTRUCTOR_FUNC_NAME)) {
                if (ce->constructor && (!ce->parent || ce->constructor != ce->parent->constructor)) {
                        zend_error_noreturn(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ZSTR_VAL(ce->name));