suppress switch branch de-duplication upon side effects (#1682)
fixes #1679
This commit is contained in:
@@ -2551,12 +2551,14 @@ merge(Compressor.prototype, {
|
||||
} else {
|
||||
body.push(branch);
|
||||
}
|
||||
blocks[key] = branch;
|
||||
fallthrough = false;
|
||||
} else {
|
||||
body.push(branch);
|
||||
fallthrough = true;
|
||||
}
|
||||
if (branch instanceof AST_Case && branch.expression.has_side_effects(compressor))
|
||||
blocks = Object.create(null);
|
||||
if (!fallthrough) blocks[key] = branch;
|
||||
}
|
||||
for (; i < len && fallthrough; i++) {
|
||||
branch = self.body[i];
|
||||
|
||||
Reference in New Issue
Block a user