]> granicus.if.org Git - php/commitdiff
Correct inline comments regarding pass1/pass2 actions
authorSara Golemon <pollita@php.net>
Tue, 31 May 2016 22:33:08 +0000 (22:33 +0000)
committerSara Golemon <pollita@php.net>
Tue, 31 May 2016 22:41:37 +0000 (22:41 +0000)
BRK/CONT no longer reach the optimizing following 8542befa7b
Pre-evaluate constant function calls is in pass1, not pass2

ext/opcache/Optimizer/pass2.c
ext/opcache/Optimizer/zend_optimizer.c

index 2be97ed9382e78d8ab7979a54d849a2fc74f5428..c24d87a4ad1cb4292b0477e52f7386a07a1a4516 100644 (file)
@@ -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"
index dd1a9200aa27a22aa84b5fcb7547127773a88093..10cdcaf93c5099635073ee1a5ee052df03cd30d2 100644 (file)
@@ -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);