Grokbase Groups PHP php-cvs May 2016
FAQ
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);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-cvs @
categoriesphp
postedMay 31, '16 at 10:43p
activeMay 31, '16 at 10:43p
posts1
users1
websitephp.net

1 user in discussion

Sara Golemon: 1 post

People

Translate

site design / logo © 2019 Grokbase