From: Mihai Bazon Date: Tue, 13 Nov 2012 12:34:38 +0000 (+0200) Subject: Merge branch 'optimize_concat' of https://github.com/rvanvelzen/UglifyJS2 into rvanve... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=60c0f40250f0f68ac78f8ddab177336040243579;p=UglifyJS.git Merge branch 'optimize_concat' of https://github.com/rvanvelzen/UglifyJS2 into rvanvelzen-optimize_concat --- 60c0f40250f0f68ac78f8ddab177336040243579 diff --cc lib/compress.js index dcd376ca,fce0757c..ed664a28 --- a/lib/compress.js +++ b/lib/compress.js @@@ -1656,6 -1642,11 +1656,11 @@@ merge(Compressor.prototype, case "<=": reverse(">="); break; } } + if (self.operator == "+" && self.right instanceof AST_String + && self.right.getValue() === "" && self.left instanceof AST_Binary - && self.left.operator == "+" && self.left.left instanceof AST_String) { ++ && self.left.operator == "+" && self.left.is_string()) { + return self.left; + } return self; });