cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c /main main.c ZendEngine2 zend.c zend.h zend_extensions.h zend_globals.h

From: Date: Fri, 19 May 2006 06:09:15 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c /main main.c ZendEngine2 zend.c zend.h zend_extensions.h zend_globals.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38281@lists.php.net to get a copy of this message
dmitry Fri May 19 06:09:15 2006 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /ZendEngine2 zend.c zend.h zend_extensions.h zend_globals.h /php-src/ext/standard basic_functions.c /php-src/main main.c Log: Optimized zend_try/zend_catch macroses (eliminated memcpy()) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.35&r2=1.2027.2.547.2.36&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.35 php-src/NEWS:1.2027.2.547.2.36 --- php-src/NEWS:1.2027.2.547.2.35 Fri May 19 02:51:00 2006 +++ php-src/NEWS Fri May 19 06:09:14 2006 @@ -3,6 +3,7 @@ ?? ??? 2006, PHP 5.2.0 - Disable realpath cache when open_basedir or safe_mode are enabled on a per-request basis. (Ilia) +- Optimized zend_try/zend_catch macroses (eliminated memcpy()). (Dmitry) - Optimized require_once/include_once (eliminated fopen() on second usage). (Dmitry) - Optimized request shutdown sequence. Restoring ini directives now http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.7&r2=1.308.2.12.2.8&diff_format=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.308.2.12.2.7 ZendEngine2/zend.c:1.308.2.12.2.8 --- ZendEngine2/zend.c:1.308.2.12.2.7 Wed May 17 13:27:51 2006 +++ ZendEngine2/zend.c Fri May 19 06:09:14 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.12.2.7 2006/05/17 13:27:51 iliaa Exp $ */ +/* $Id: zend.c,v 1.308.2.12.2.8 2006/05/19 06:09:14 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -760,14 +760,14 @@ { TSRMLS_FETCH(); - if (!EG(bailout_set)) { + if (!EG(bailout)) { zend_output_debug_string(1, "%s(%d) : Bailed out without a bailout address!", filename, lineno); exit(-1); } CG(unclean_shutdown) = 1; CG(in_compilation) = EG(in_execution) = 0; EG(current_execute_data) = NULL; - longjmp(EG(bailout), FAILURE); + longjmp(*EG(bailout), FAILURE); } END_EXTERN_C() http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.2&r2=1.293.2.11.2.3&diff_format=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.293.2.11.2.2 ZendEngine2/zend.h:1.293.2.11.2.3 --- ZendEngine2/zend.h:1.293.2.11.2.2 Fri May 12 05:36:09 2006 +++ ZendEngine2/zend.h Fri May 19 06:09:14 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.293.2.11.2.2 2006/05/12 05:36:09 sebastian Exp $ */ +/* $Id: zend.h,v 1.293.2.11.2.3 2006/05/19 06:09:14 dmitry Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -448,19 +448,19 @@ #define zend_try \ { \ - jmp_buf orig_bailout; \ - zend_bool orig_bailout_set=EG(bailout_set); \ + jmp_buf *orig_bailout = EG(bailout); \ + jmp_buf bailout; \ \ - EG(bailout_set) = 1; \ - memcpy(&orig_bailout, &EG(bailout), sizeof(jmp_buf)); \ - if (setjmp(EG(bailout))==0) + EG(bailout) = &bailout; \ + if (setjmp(bailout)==0) { #define zend_catch \ - else + } else { \ + EG(bailout) = orig_bailout; #define zend_end_try() \ - memcpy(&EG(bailout), &orig_bailout, sizeof(jmp_buf)); \ - EG(bailout_set) = orig_bailout_set; \ + } \ + EG(bailout) = orig_bailout; \ } -#define zend_first_try EG(bailout_set)=0; zend_try +#define zend_first_try EG(bailout)=NULL; zend_try BEGIN_EXTERN_C() ZEND_API char *get_zend_version(void); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_extensions.h?r1=1.67.2.3.2.1&r2=1.67.2.3.2.2&diff_format=u Index: ZendEngine2/zend_extensions.h diff -u ZendEngine2/zend_extensions.h:1.67.2.3.2.1 ZendEngine2/zend_extensions.h:1.67.2.3.2.2 --- ZendEngine2/zend_extensions.h:1.67.2.3.2.1 Tue May 9 23:53:23 2006 +++ ZendEngine2/zend_extensions.h Fri May 19 06:09:14 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.h,v 1.67.2.3.2.1 2006/05/09 23:53:23 helly Exp $ */ +/* $Id: zend_extensions.h,v 1.67.2.3.2.2 2006/05/19 06:09:14 dmitry Exp $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H @@ -27,7 +27,7 @@ /* The first number is the engine version and the rest is the date. * This way engine 2/3 API no. is always greater than engine 1 API no.. */ -#define ZEND_EXTENSION_API_NO 220060510 +#define ZEND_EXTENSION_API_NO 220060519 typedef struct _zend_extension_version_info { int zend_extension_api_no; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_globals.h?r1=1.141.2.3.2.2&r2=1.141.2.3.2.3&diff_format=u Index: ZendEngine2/zend_globals.h diff -u ZendEngine2/zend_globals.h:1.141.2.3.2.2 ZendEngine2/zend_globals.h:1.141.2.3.2.3 --- ZendEngine2/zend_globals.h:1.141.2.3.2.2 Mon May 15 14:52:35 2006 +++ ZendEngine2/zend_globals.h Fri May 19 06:09:14 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_globals.h,v 1.141.2.3.2.2 2006/05/15 14:52:35 dmitry Exp $ */ +/* $Id: zend_globals.h,v 1.141.2.3.2.3 2006/05/19 06:09:14 dmitry Exp $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H @@ -176,7 +176,7 @@ HashTable included_files; /* files already included */ - jmp_buf bailout; + jmp_buf *bailout; int error_reporting; int orig_error_reporting; @@ -199,7 +199,6 @@ zend_bool in_execution; HashTable *in_autoload; zend_function *autoload_func; - zend_bool bailout_set; zend_bool full_tables_cleanup; /* for extended information support */ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.2&r2=1.725.2.31.2.3&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.2 php-src/ext/standard/basic_functions.c:1.725.2.31.2.3 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.2 Sun May 14 16:06:48 2006 +++ php-src/ext/standard/basic_functions.c Fri May 19 06:09:14 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.2 2006/05/14 16:06:48 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.3 2006/05/19 06:09:14 dmitry Exp $ */ #include "php.h" #include "php_streams.h" @@ -2366,13 +2366,13 @@ void php_call_shutdown_functions(TSRMLS_D) { - if (BG(user_shutdown_function_names)) + if (BG(user_shutdown_function_names)) { zend_try { zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); - memcpy(&EG(bailout), &orig_bailout, sizeof(jmp_buf)); - php_free_shutdown_functions(TSRMLS_C); } zend_end_try(); + php_free_shutdown_functions(TSRMLS_C); + } } void php_free_shutdown_functions(TSRMLS_D) http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.640.2.23.2.4&r2=1.640.2.23.2.5&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.4 php-src/main/main.c:1.640.2.23.2.5 --- php-src/main/main.c:1.640.2.23.2.4 Tue May 16 00:39:32 2006 +++ php-src/main/main.c Fri May 19 06:09:15 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.23.2.4 2006/05/16 00:39:32 iliaa Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.5 2006/05/19 06:09:15 dmitry Exp $ */ /* {{{ includes */ @@ -1437,7 +1437,7 @@ ts_allocate_id(&core_globals_id, sizeof(php_core_globals), (ts_allocate_ctor) core_globals_ctor, NULL); core_globals = ts_resource(core_globals_id); #endif - EG(bailout_set) = 0; + EG(bailout) = NULL; EG(error_reporting) = E_ALL & ~E_NOTICE; PG(header_is_being_sent) = 0;

« previous php.cvs (#38281) next »