aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-10-04 08:49:18 +0300
committerMihai Bazon <mihai@bazon.net>2012-10-04 08:49:18 +0300
commit682a58a1f55d171a1705bdb16ec98e5c2ec855a1 (patch)
treedbba9577dda8c1b703c8e5f27674136ca2d085ff /lib/compress.js
parentf20c25188297d8a18e81c01af10986b23d90671c (diff)
downloadtracifyjs-682a58a1f55d171a1705bdb16ec98e5c2ec855a1.tar.gz
tracifyjs-682a58a1f55d171a1705bdb16ec98e5c2ec855a1.zip
removed some unused variables
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 10c1d222..fcf022e1 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -210,7 +210,6 @@ merge(Compressor.prototype, {
function handle_if_return(statements, compressor) {
var self = compressor.self();
var in_lambda = self instanceof AST_Lambda;
- var last = statements.length - 1;
var ret = [];
loop: for (var i = statements.length; --i >= 0;) {
var stat = statements[i];
@@ -1378,8 +1377,8 @@ merge(Compressor.prototype, {
}
if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) {
case "&&":
- var ll = self.left.evaluate(compressor), left = ll[0];
- var rr = self.right.evaluate(compressor), right = rr[0];
+ var ll = self.left.evaluate(compressor);
+ var rr = self.right.evaluate(compressor);
if ((ll.length > 1 && !ll[1]) || (rr.length > 1 && !rr[1])) {
compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start);
return make_node(AST_False, self);
@@ -1392,8 +1391,8 @@ merge(Compressor.prototype, {
}
break;
case "||":
- var ll = self.left.evaluate(compressor), left = ll[0];
- var rr = self.right.evaluate(compressor), right = rr[0];
+ var ll = self.left.evaluate(compressor);
+ var rr = self.right.evaluate(compressor);
if ((ll.length > 1 && ll[1]) || (rr.length > 1 && rr[1])) {
compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start);
return make_node(AST_True, self);
@@ -1406,8 +1405,8 @@ merge(Compressor.prototype, {
}
break;
case "+":
- var ll = self.left.evaluate(compressor), left = ll[0];
- var rr = self.right.evaluate(compressor), right = rr[0];
+ var ll = self.left.evaluate(compressor);
+ var rr = self.right.evaluate(compressor);
if ((ll.length > 1 && ll[0] instanceof AST_String && ll[1]) ||
(rr.length > 1 && rr[0] instanceof AST_String && rr[1])) {
compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start);