gate various label-related transformations (#3812)
This commit is contained in:
@@ -3962,11 +3962,12 @@ merge(Compressor.prototype, {
|
||||
});
|
||||
|
||||
OPT(AST_LabeledStatement, function(self, compressor) {
|
||||
if (self.body instanceof AST_Break
|
||||
if (compressor.option("dead_code")
|
||||
&& self.body instanceof AST_Break
|
||||
&& compressor.loopcontrol_target(self.body) === self.body) {
|
||||
return make_node(AST_EmptyStatement, self);
|
||||
}
|
||||
return self.label.references.length == 0 ? self.body : self;
|
||||
return compressor.option("unused") && self.label.references.length == 0 ? self.body : self;
|
||||
});
|
||||
|
||||
OPT(AST_Block, function(self, compressor) {
|
||||
|
||||
Reference in New Issue
Block a user