cvs: ZendEngine2 / zend_API.c zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c

From: Date: Fri, 23 Jan 2004 22:04:42 +0000
Subject: cvs: ZendEngine2 / zend_API.c zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2247@lists.php.net to get a copy of this message
helly Fri Jan 23 17:04:42 2004 EDT Modified files: /ZendEngine2 zend_API.c zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c Log: Simplify detection of methods that must be called dynamic (with object) http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.236&r2=1.237&ty=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.236 ZendEngine2/zend_API.c:1.237 --- ZendEngine2/zend_API.c:1.236 Fri Jan 23 15:52:39 2004 +++ ZendEngine2/zend_API.c Fri Jan 23 17:04:42 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.236 2004/01/23 20:52:39 helly Exp $ */ +/* $Id: zend_API.c,v 1.237 2004/01/23 22:04:42 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1293,19 +1293,19 @@ scope->destructor = dtor; scope->clone = clone; if (ctor) { - ctor->common.fn_flags |= ZEND_ACC_CTOR; + ctor->common.fn_flags |= ZEND_ACC_CTOR|ZEND_ACC_DYNAMIC; if (ctor->common.fn_flags & ZEND_ACC_STATIC) { zend_error(error_type, "Constructor %s::%s cannot be static", ctor->common.scope->name, ctor->common.function_name); } } if (dtor) { - dtor->common.fn_flags |= ZEND_ACC_DTOR; + dtor->common.fn_flags |= ZEND_ACC_DTOR|ZEND_ACC_DYNAMIC; if (dtor->common.fn_flags & ZEND_ACC_STATIC) { zend_error(error_type, "Destructor %s::%s cannot be static", dtor->common.scope->name, dtor->common.function_name); } } if (clone) { - clone->common.fn_flags |= ZEND_ACC_CLONE; + clone->common.fn_flags |= ZEND_ACC_CLONE|ZEND_ACC_DYNAMIC; if (clone->common.fn_flags & ZEND_ACC_STATIC) { zend_error(error_type, "Constructor %s::%s cannot be static", clone->common.scope->name, clone->common.function_name); } http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.516&r2=1.517&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.516 ZendEngine2/zend_compile.c:1.517 --- ZendEngine2/zend_compile.c:1.516 Fri Jan 23 15:52:39 2004 +++ ZendEngine2/zend_compile.c Fri Jan 23 17:04:42 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.516 2004/01/23 20:52:39 helly Exp $ */ +/* $Id: zend_compile.c,v 1.517 2004/01/23 22:04:42 helly Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -2389,19 +2389,19 @@ do_inherit_parent_constructor(ce); if (ce->constructor) { - ce->constructor->common.fn_flags |= ZEND_ACC_CTOR; + ce->constructor->common.fn_flags |= ZEND_ACC_CTOR|ZEND_ACC_DYNAMIC; if (ce->constructor->common.fn_flags & ZEND_ACC_STATIC) { zend_error(E_COMPILE_ERROR, "Constructor %s::%s() cannot be static", ce->name, ce->constructor->common.function_name); } } if (ce->destructor) { - ce->destructor->common.fn_flags |= ZEND_ACC_DTOR; + ce->destructor->common.fn_flags |= ZEND_ACC_DTOR|ZEND_ACC_DYNAMIC; if (ce->destructor->common.fn_flags & ZEND_ACC_STATIC) { zend_error(E_COMPILE_ERROR, "Destructor %s::%s() cannot be static", ce->name, ce->destructor->common.function_name); } } if (ce->clone) { - ce->clone->common.fn_flags |= ZEND_ACC_CLONE; + ce->clone->common.fn_flags |= ZEND_ACC_CLONE|ZEND_ACC_DYNAMIC; if (ce->clone->common.fn_flags & ZEND_ACC_STATIC) { zend_error(E_COMPILE_ERROR, "Clone method %s::%s() cannot be static", ce->name, ce->clone->common.function_name); } http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.268&r2=1.269&ty=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.268 ZendEngine2/zend_compile.h:1.269 --- ZendEngine2/zend_compile.h:1.268 Fri Jan 23 15:52:39 2004 +++ ZendEngine2/zend_compile.h Fri Jan 23 17:04:42 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.268 2004/01/23 20:52:39 helly Exp $ */ +/* $Id: zend_compile.h,v 1.269 2004/01/23 22:04:42 helly Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -101,6 +101,8 @@ #define ZEND_ACC_ABSTRACT_CLASS 0x10 #define ZEND_ACC_FINAL_CLASS 0x20 +#define ZEND_ACC_DYNAMIC 0x80 + /* The order of those must be kept - public < protected < private */ #define ZEND_ACC_PUBLIC 0x100 #define ZEND_ACC_PROTECTED 0x200 http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.585&r2=1.586&ty=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.585 ZendEngine2/zend_execute.c:1.586 --- ZendEngine2/zend_execute.c:1.585 Fri Jan 23 15:58:23 2004 +++ ZendEngine2/zend_execute.c Fri Jan 23 17:04:42 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.585 2004/01/23 20:58:23 helly Exp $ */ +/* $Id: zend_execute.c,v 1.586 2004/01/23 22:04:42 helly Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -2520,7 +2520,7 @@ if (EX(function_state).function->common.scope) { if (!EG(This) && !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)) { int severity; - if (EX(function_state).function->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR|ZEND_ACC_CLONE)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DYNAMIC) { severity = E_ERROR; } else { severity = E_STRICT; http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.252&r2=1.253&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.252 ZendEngine2/zend_execute_API.c:1.253 --- ZendEngine2/zend_execute_API.c:1.252 Fri Jan 23 15:58:23 2004 +++ ZendEngine2/zend_execute_API.c Fri Jan 23 17:04:42 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.252 2004/01/23 20:58:23 helly Exp $ */ +/* $Id: zend_execute_API.c,v 1.253 2004/01/23 22:04:42 helly Exp $ */ #include <stdio.h> #include <signal.h> @@ -718,7 +718,7 @@ EG(This) = NULL; if (calling_scope && !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)) { int severity; - if (EX(function_state).function->common.fn_flags & (ZEND_ACC_CTOR|ZEND_ACC_DTOR|ZEND_ACC_CLONE)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DYNAMIC) { severity = E_ERROR; } else { severity = E_STRICT;

« previous php.zend-engine.cvs (#2247) next »