* PHP-5.6:
Improved fix for #71127
Conflicts:
ext/opcache/Optimizer/pass1_5.c
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) {
#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