Browse Source
Refactored optimizer (compile different opimizer passes separately, instead of including *.c file)
pull/788/head
Refactored optimizer (compile different opimizer passes separately, instead of including *.c file)
pull/788/head
15 changed files with 209 additions and 175 deletions
-
24ext/opcache/Optimizer/block_pass.c
-
11ext/opcache/Optimizer/compact_literals.c
-
10ext/opcache/Optimizer/nop_removal.c
-
11ext/opcache/Optimizer/optimize_func_calls.c
-
10ext/opcache/Optimizer/optimize_temp_vars_5.c
-
24ext/opcache/Optimizer/pass10.c
-
49ext/opcache/Optimizer/pass1_5.c
-
11ext/opcache/Optimizer/pass2.c
-
11ext/opcache/Optimizer/pass3.c
-
24ext/opcache/Optimizer/pass5.c
-
29ext/opcache/Optimizer/pass9.c
-
104ext/opcache/Optimizer/zend_optimizer.c
-
54ext/opcache/Optimizer/zend_optimizer_internal.h
-
10ext/opcache/config.m4
-
2ext/opcache/config.w32
@ -1,24 +0,0 @@ |
|||
/* |
|||
+----------------------------------------------------------------------+ |
|||
| Zend OPcache | |
|||
+----------------------------------------------------------------------+ |
|||
| Copyright (c) 1998-2014 The PHP Group | |
|||
+----------------------------------------------------------------------+ |
|||
| This source file is subject to version 3.01 of the PHP license, | |
|||
| that is bundled with this package in the file LICENSE, and is | |
|||
| available through the world-wide-web at the following url: | |
|||
| http://www.php.net/license/3_01.txt | |
|||
| If you did not receive a copy of the PHP license and are unable to | |
|||
| obtain it through the world-wide-web, please send a note to | |
|||
| license@php.net so we can mail you a copy immediately. | |
|||
+----------------------------------------------------------------------+ |
|||
| Authors: Andi Gutmans <andi@zend.com> | |
|||
| Zeev Suraski <zeev@zend.com> | |
|||
| Stanislav Malyshev <stas@zend.com> | |
|||
| Dmitry Stogov <dmitry@zend.com> | |
|||
+----------------------------------------------------------------------+ |
|||
*/ |
|||
|
|||
if (((ZEND_OPTIMIZER_PASS_10|ZEND_OPTIMIZER_PASS_5) & OPTIMIZATION_LEVEL) == ZEND_OPTIMIZER_PASS_10) { |
|||
nop_removal(op_array); |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
/* |
|||
+----------------------------------------------------------------------+ |
|||
| Zend OPcache | |
|||
+----------------------------------------------------------------------+ |
|||
| Copyright (c) 1998-2014 The PHP Group | |
|||
+----------------------------------------------------------------------+ |
|||
| This source file is subject to version 3.01 of the PHP license, | |
|||
| that is bundled with this package in the file LICENSE, and is | |
|||
| available through the world-wide-web at the following url: | |
|||
| http://www.php.net/license/3_01.txt | |
|||
| If you did not receive a copy of the PHP license and are unable to | |
|||
| obtain it through the world-wide-web, please send a note to | |
|||
| license@php.net so we can mail you a copy immediately. | |
|||
+----------------------------------------------------------------------+ |
|||
| Authors: Andi Gutmans <andi@zend.com> | |
|||
| Zeev Suraski <zeev@zend.com> | |
|||
| Stanislav Malyshev <stas@zend.com> | |
|||
| Dmitry Stogov <dmitry@zend.com> | |
|||
+----------------------------------------------------------------------+ |
|||
*/ |
|||
|
|||
if (ZEND_OPTIMIZER_PASS_5 & OPTIMIZATION_LEVEL) { |
|||
zend_block_optimization(op_array, ctx TSRMLS_CC); |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
/* |
|||
+----------------------------------------------------------------------+ |
|||
| Zend OPcache | |
|||
+----------------------------------------------------------------------+ |
|||
| Copyright (c) 1998-2014 The PHP Group | |
|||
+----------------------------------------------------------------------+ |
|||
| This source file is subject to version 3.01 of the PHP license, | |
|||
| that is bundled with this package in the file LICENSE, and is | |
|||
| available through the world-wide-web at the following url: | |
|||
| http://www.php.net/license/3_01.txt | |
|||
| If you did not receive a copy of the PHP license and are unable to | |
|||
| obtain it through the world-wide-web, please send a note to | |
|||
| license@php.net so we can mail you a copy immediately. | |
|||
+----------------------------------------------------------------------+ |
|||
| Authors: Andi Gutmans <andi@zend.com> | |
|||
| Zeev Suraski <zeev@zend.com> | |
|||
| Stanislav Malyshev <stas@zend.com> | |
|||
| Dmitry Stogov <dmitry@zend.com> | |
|||
+----------------------------------------------------------------------+ |
|||
*/ |
|||
|
|||
/* pass 9 |
|||
* |
|||
* - optimize usage of temporary variables |
|||
*/ |
|||
|
|||
if (ZEND_OPTIMIZER_PASS_9 & OPTIMIZATION_LEVEL) { |
|||
optimize_temporary_variables(op_array, ctx); |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue