cvs: ZendEngine2 / zend_compile.h zend_execute_API.c zend_vm_def.h zend_vm_execute.h

From: Date: Mon, 20 Feb 2006 20:00:46 +0000
Subject: cvs: ZendEngine2 / zend_compile.h zend_execute_API.c zend_vm_def.h zend_vm_execute.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4596@lists.php.net to get a copy of this message
helly Mon Feb 20 20:00:46 2006 UTC Modified files: /ZendEngine2 zend_compile.h zend_execute_API.c zend_vm_def.h zend_vm_execute.h Log: - Add deprecation flag and message http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.h?r1=1.330&r2=1.331&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.330 ZendEngine2/zend_compile.h:1.331 --- ZendEngine2/zend_compile.h:1.330 Mon Feb 13 10:23:57 2006 +++ ZendEngine2/zend_compile.h Mon Feb 20 20:00:46 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.330 2006/02/13 10:23:57 dmitry Exp $ */ +/* $Id: zend_compile.h,v 1.331 2006/02/20 20:00:46 helly Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -136,6 +136,9 @@ /* shadow of parent's private method/property */ #define ZEND_ACC_SHADOW 0x20000 +/* deprecation flag */ +#define ZEND_ACC_DEPRECATED 0x40000 + char *zend_visibility_string(zend_uint fn_flags); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute_API.c?r1=1.356&r2=1.357&diff_format=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.356 ZendEngine2/zend_execute_API.c:1.357 --- ZendEngine2/zend_execute_API.c:1.356 Mon Feb 20 19:03:42 2006 +++ ZendEngine2/zend_execute_API.c Mon Feb 20 20:00:46 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.356 2006/02/20 19:03:42 dmitry Exp $ */ +/* $Id: zend_execute_API.c,v 1.357 2006/02/20 20:00:46 helly Exp $ */ #include <stdio.h> #include <signal.h> @@ -861,6 +861,13 @@ fci->object_pp = fci_cache->object_pp; } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + } + for (i=0; i<fci->param_count; i++) { zval *param; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_def.h?r1=1.95&r2=1.96&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.95 ZendEngine2/zend_vm_def.h:1.96 --- ZendEngine2/zend_vm_def.h:1.95 Mon Feb 20 19:03:43 2006 +++ ZendEngine2/zend_vm_def.h Mon Feb 20 20:00:46 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.95 2006/02/20 19:03:43 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.96 2006/02/20 20:00:46 helly Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -1813,10 +1813,18 @@ zend_bool should_change_scope; zend_op *ctor_opline; - if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { - /* FIXME: output identifiers properly */ - zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); - ZEND_VM_NEXT_OPCODE(); /* Never reached */ + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { + /* FIXME: output identifiers properly */ + zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); + ZEND_VM_NEXT_OPCODE(); /* Never reached */ + } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + } } zend_ptr_stack_2_push(&EG(argument_stack), (void *) opline->extended_value, NULL); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_vm_execute.h?r1=1.99&r2=1.100&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.99 ZendEngine2/zend_vm_execute.h:1.100 --- ZendEngine2/zend_vm_execute.h:1.99 Mon Feb 20 19:03:43 2006 +++ ZendEngine2/zend_vm_execute.h Mon Feb 20 20:00:46 2006 @@ -139,10 +139,18 @@ zend_bool should_change_scope; zend_op *ctor_opline; - if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { - /* FIXME: output identifiers properly */ - zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); - ZEND_VM_NEXT_OPCODE(); /* Never reached */ + if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { + if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { + /* FIXME: output identifiers properly */ + zend_error_noreturn(E_ERROR, "Cannot call abstract method %v::%v()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); + ZEND_VM_NEXT_OPCODE(); /* Never reached */ + } + if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { + zend_error(E_NOTICE, "Function %s%s%s() is deprecated", + EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", + EX(function_state).function->common.scope ? "::" : "", + EX(function_state).function->common.function_name); + } } zend_ptr_stack_2_push(&EG(argument_stack), (void *) opline->extended_value, NULL);

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