@@ -517,6 +517,15 @@ merge(Compressor.prototype, {
|
|||||||
pop(tw);
|
pop(tw);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
def(AST_Case, function(tw) {
|
||||||
|
push(tw);
|
||||||
|
this.expression.walk(tw);
|
||||||
|
pop(tw);
|
||||||
|
push(tw);
|
||||||
|
walk_body(this, tw);
|
||||||
|
pop(tw);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
def(AST_Conditional, function(tw) {
|
def(AST_Conditional, function(tw) {
|
||||||
this.condition.walk(tw);
|
this.condition.walk(tw);
|
||||||
push(tw);
|
push(tw);
|
||||||
@@ -527,6 +536,12 @@ merge(Compressor.prototype, {
|
|||||||
pop(tw);
|
pop(tw);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
def(AST_Default, function(tw, descend) {
|
||||||
|
push(tw);
|
||||||
|
descend();
|
||||||
|
pop(tw);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
def(AST_Defun, function(tw, descend, compressor) {
|
def(AST_Defun, function(tw, descend, compressor) {
|
||||||
this.inlined = false;
|
this.inlined = false;
|
||||||
var save_ids = tw.safe_ids;
|
var save_ids = tw.safe_ids;
|
||||||
@@ -624,12 +639,6 @@ merge(Compressor.prototype, {
|
|||||||
pop(tw);
|
pop(tw);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
def(AST_SwitchBranch, function(tw, descend) {
|
|
||||||
push(tw);
|
|
||||||
descend();
|
|
||||||
pop(tw);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
def(AST_SymbolCatch, function() {
|
def(AST_SymbolCatch, function() {
|
||||||
this.definition().fixed = false;
|
this.definition().fixed = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5545,3 +5545,33 @@ issue_2919: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "function"
|
expect_stdout: "function"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_2992: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
var c = "PASS";
|
||||||
|
(function f(b) {
|
||||||
|
switch (0) {
|
||||||
|
case 0:
|
||||||
|
case b = 1:
|
||||||
|
b && (c = "FAIL");
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
var c = "PASS";
|
||||||
|
(function f(b) {
|
||||||
|
switch (0) {
|
||||||
|
case 0:
|
||||||
|
case b = 1:
|
||||||
|
b && (c = "FAIL");
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
console.log(c);
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user