[Pkg-javascript-commits] [uglifyjs] 08/11: Don't drop parens in a * (b * c). Close #744

Jonas Smedegaard dr at jones.dk
Wed Aug 26 09:34:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v2.4.24
in repository uglifyjs.

commit 85a5fc0aeb1785982506c09a484e12608ba01624
Author: Mihai Bazon <mihai.bazon at gmail.com>
Date:   Tue Jun 30 10:07:13 2015 +0300

    Don't drop parens in a * (b * c).  Close #744
---
 lib/compress.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/compress.js b/lib/compress.js
index 530e7c2..091ad9e 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2230,10 +2230,11 @@ merge(Compressor.prototype, {
                 }
             }
         }
-        // x * (y * z)  ==>  x * y * z
+        // x && (y && z)  ==>  x && y && z
+        // x || (y || z)  ==>  x || y || z
         if (self.right instanceof AST_Binary
             && self.right.operator == self.operator
-            && (self.operator == "*" || self.operator == "&&" || self.operator == "||"))
+            && (self.operator == "&&" || self.operator == "||"))
         {
             self.left = make_node(AST_Binary, self.left, {
                 operator : self.operator,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list