]> granicus.if.org Git - php/commitdiff
Remove unnecessary pattern
authorXinchen Hui <laruence@gmail.com>
Thu, 17 Mar 2016 12:21:36 +0000 (20:21 +0800)
committerXinchen Hui <laruence@gmail.com>
Thu, 17 Mar 2016 12:21:36 +0000 (20:21 +0800)
ext/opcache/Optimizer/block_pass.c

index 830addc38acfc2488a847583ca37cdb5475f4e9e..e168457661b8a2c5edf71505443d3eebd48a9006 100644 (file)
@@ -681,6 +681,9 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
                        MAKE_NOP(src);
                }
 
+#if 0
+          /* This pattern is unnecessary for PHP7, 
+               * since compiler won't generate ZEND_FREE for ZEND_BOOL anymore */
        /* T = BOOL(X), FREE(T) => NOP */
                if (opline->opcode == ZEND_FREE &&
                        ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
@@ -698,7 +701,6 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
                        }
                }
 
-#if 0
                /* pre-evaluate functions:
                   constant(x)
                   defined(x)