From: Sara Golemon Date: Tue, 31 May 2016 22:33:08 +0000 (+0000) Subject: Correct inline comments regarding pass1/pass2 actions X-Git-Tag: php-7.1.0alpha1~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51b3be7e760b3bc948c6d7751d8b74f9142c3138;p=php 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 --- diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c index 2be97ed938..c24d87a4ad 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 dd1a9200aa..10cdcaf93c 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);