[ES6] Get compress and global_defs working for AST_Class

This commit is contained in:
kzc
2016-07-17 12:59:38 -04:00
committed by Richard van Velzen
parent 0af42d1831
commit 842ac27efb
3 changed files with 88 additions and 0 deletions

View File

@@ -2988,6 +2988,12 @@ merge(Compressor.prototype, {
return self;
});
OPT(AST_Class, function(self, compressor){
// HACK to avoid compress failure.
// AST_Class is not really an AST_Scope/AST_Block as it lacks a body.
return self;
});
OPT(AST_Yield, function(self, compressor){
if (!self.is_star && self.expression instanceof AST_Undefined) {
self.expression = null;