com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/opcache/O ptimizer/pass1_5.c ext/opcache/Optimizer/zend_optim izer.h

From: Date: Fri, 18 Dec 2015 09:41:42 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/opcache/O ptimizer/pass1_5.c ext/opcache/Optimizer/zend_optim izer.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90334@lists.php.net to get a copy of this message
Commit: 2f47e9872ed8ec9a125862e182f9e0068adf6f5a Author: Xinchen Hui <laruence@gmail.com> Fri, 18 Dec 2015 17:41:42 +0800 Parents: 4e01269082d20f5598c481f122b3eea10a586e2b 40702799b5f08b093477098881b6e0cfcb3ea411 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2f47e9872ed8ec9a125862e182f9e0068adf6f5a Log: Merge branch 'PHP-5.6' into PHP-7.0 * PHP-5.6: Improved fix for #71127 Conflicts: ext/opcache/Optimizer/pass1_5.c Bugs: https://bugs.php.net/71127 Changed paths: MM ext/opcache/Optimizer/pass1_5.c MM ext/opcache/Optimizer/zend_optimizer.h Diff: diff --cc ext/opcache/Optimizer/pass1_5.c index 7e0d14a,4229f13..24c28e9 --- a/ext/opcache/Optimizer/pass1_5.c +++ b/ext/opcache/Optimizer/pass1_5.c @@@ -42,9 -16,8 +42,8 @@@ void zend_optimizer_pass1(zend_op_arra int i = 0; zend_op *opline = op_array->opcodes; zend_op *end = opline + op_array->last; - /* bug #71127* - zend_bool collect_constants = (op_array == &ctx->script->main_op_array); */ - zend_bool collect_constants = 0; + zend_bool collect_constants = (ZEND_OPTIMIZER_PASS_15 & OPTIMIZATION_LEVEL)? - (op_array == &script->main_op_array) : 0; ++ (op_array == &ctx->script->main_op_array) : 0; while (opline < end) { switch (opline->opcode) { diff --cc ext/opcache/Optimizer/zend_optimizer.h index 27c6159,f4e4417..8c1b8ea --- a/ext/opcache/Optimizer/zend_optimizer.h +++ b/ext/opcache/Optimizer/zend_optimizer.h @@@ -36,9 -36,10 +36,10 @@@ #define ZEND_OPTIMIZER_PASS_9 (1<<8) /* TMP VAR usage */ #define ZEND_OPTIMIZER_PASS_10 (1<<9) /* NOP removal */ #define ZEND_OPTIMIZER_PASS_11 (1<<10) /* Merge equal constants */ -#define ZEND_OPTIMIZER_PASS_12 (1<<11) +#define ZEND_OPTIMIZER_PASS_12 (1<<11) /* Adjust used stack */ #define ZEND_OPTIMIZER_PASS_13 (1<<12) #define ZEND_OPTIMIZER_PASS_14 (1<<13) + #define ZEND_OPTIMIZER_PASS_15 (1<<14) /* Collect constants */ #define ZEND_OPTIMIZER_ALL_PASSES 0xFFFFFFFF

« previous php.cvs (#90334) next »