com php-src: Correct inline comments regarding pass1/pass2 actions: ext/opcache/Optimizer/pass2.c ext/opcache/Optimizer/zend_opti mizer.c
| From: | Sara Golemon | Date: | Tue, 31 May 2016 22:41:37 +0000 |
| Subject: | com php-src: Correct inline comments regarding pass1/pass2 actions: ext/opcache/Optimizer/pass2.c ext/opcache/Optimizer/zend_opti mizer.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92260@lists.php.net to get a copy of this message | ||
Commit: 51b3be7e760b3bc948c6d7751d8b74f9142c3138
Author: Sara Golemon <pollita@php.net> Tue, 31 May 2016 22:33:08 +0000
Parents: ce02f0f3b81d0052d1894b766cb89a4862ba0b3a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=51b3be7e760b3bc948c6d7751d8b74f9142c3138
Log:
Correct inline comments regarding pass1/pass2 actions
BRK/CONT no longer reach the optimizing following 8542befa7b
Pre-evaluate constant function calls is in pass1, not pass2
Changed paths:
M ext/opcache/Optimizer/pass2.c
M ext/opcache/Optimizer/zend_optimizer.c
Diff:
diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c
index 2be97ed..c24d87a 100644
--- a/ext/opcache/Optimizer/pass2.c
+++ b/ext/opcache/Optimizer/pass2.c
@@ -22,7 +22,6 @@
/* pass 2:
* - convert non-numeric constants to numeric constants in numeric operators
* - optimize constant conditional JMPs
- * - optimize static BRKs and CONTs
*/
#include "php.h"
diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c
index dd1a920..10cdcaf 100644
--- a/ext/opcache/Optimizer/zend_optimizer.c
+++ b/ext/opcache/Optimizer/zend_optimizer.c
@@ -600,6 +600,7 @@ static void zend_optimize(zend_op_array *op_array,
* - perform compile-time evaluation of constant binary and unary operations
* - optimize series of ADD_STRING and/or ADD_CHAR
* - convert CAST(IS_BOOL,x) into BOOL(x)
+ * - pre-evaluate constant function calls
*/
if (ZEND_OPTIMIZER_PASS_1 & ctx->optimization_level) {
zend_optimizer_pass1(op_array, ctx);
@@ -611,8 +612,6 @@ static void zend_optimize(zend_op_array *op_array,
/* pass 2:
* - convert non-numeric constants to numeric constants in numeric operators
* - optimize constant conditional JMPs
- * - optimize static BRKs and CONTs
- * - pre-evaluate constant function calls
*/
if (ZEND_OPTIMIZER_PASS_2 & ctx->optimization_level) {
zend_optimizer_pass2(op_array);