remove duplicated optimisation for AST_Case
- `expression` already handled by existing rules during `descend(node, this)` - `body` can be handled by `OPT(AST_Block)`
This commit is contained in:
parent
c7a4c579e7
commit
1c1e673e52
|
|
@ -2591,16 +2591,6 @@ merge(Compressor.prototype, {
|
||||||
return self;
|
return self;
|
||||||
});
|
});
|
||||||
|
|
||||||
OPT(AST_Case, function(self, compressor){
|
|
||||||
var value = self.expression.evaluate(compressor);
|
|
||||||
if (value !== self.expression) {
|
|
||||||
var expression = make_node_from_constant(value, self.expression).transform(compressor);
|
|
||||||
self.expression = best_of_expression(expression, self.expression);
|
|
||||||
}
|
|
||||||
self.body = tighten_body(self.body, compressor);
|
|
||||||
return self;
|
|
||||||
});
|
|
||||||
|
|
||||||
OPT(AST_Try, function(self, compressor){
|
OPT(AST_Try, function(self, compressor){
|
||||||
self.body = tighten_body(self.body, compressor);
|
self.body = tighten_body(self.body, compressor);
|
||||||
return self;
|
return self;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user