handle AST_Super in collapse_vars & side_effects
This commit is contained in:
@@ -579,6 +579,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
|
||||
function is_lhs_read_only(lhs) {
|
||||
if (lhs instanceof AST_Super) return true;
|
||||
if (lhs instanceof AST_This) return true;
|
||||
if (lhs instanceof AST_SymbolRef) return lhs.definition().orig[0] instanceof AST_SymbolLambda;
|
||||
if (lhs instanceof AST_PropAccess) {
|
||||
@@ -2109,6 +2110,7 @@ merge(Compressor.prototype, {
|
||||
|
||||
def(AST_EmptyStatement, return_false);
|
||||
def(AST_Constant, return_false);
|
||||
def(AST_Super, return_false);
|
||||
def(AST_This, return_false);
|
||||
|
||||
def(AST_Call, function(compressor){
|
||||
@@ -2787,6 +2789,7 @@ merge(Compressor.prototype, {
|
||||
|
||||
def(AST_Node, return_this);
|
||||
def(AST_Constant, return_null);
|
||||
def(AST_Super, return_null);
|
||||
def(AST_This, return_null);
|
||||
def(AST_Call, function(compressor, first_in_statement){
|
||||
if (!this.is_expr_pure(compressor)) {
|
||||
|
||||
Reference in New Issue
Block a user