AST_LabelRef no longer inherits from AST_SymbolRef

This commit is contained in:
Mihai Bazon
2012-11-08 15:39:14 +02:00
parent 64270b9778
commit 1e5e13ed81
2 changed files with 3 additions and 4 deletions

View File

@@ -810,7 +810,7 @@ var AST_SymbolRef = DEFNODE("SymbolRef", null, {
var AST_LabelRef = DEFNODE("LabelRef", null, { var AST_LabelRef = DEFNODE("LabelRef", null, {
$documentation: "Reference to a label symbol", $documentation: "Reference to a label symbol",
}, AST_SymbolRef); }, AST_Symbol);
var AST_This = DEFNODE("This", null, { var AST_This = DEFNODE("This", null, {
$documentation: "The `this` symbol", $documentation: "The `this` symbol",

View File

@@ -885,7 +885,7 @@ merge(Compressor.prototype, {
}); });
return true; return true;
} }
if (node instanceof AST_SymbolRef && !(node instanceof AST_LabelRef)) { if (node instanceof AST_SymbolRef) {
push_uniq(in_use, node.definition()); push_uniq(in_use, node.definition());
return true; return true;
} }
@@ -908,8 +908,7 @@ merge(Compressor.prototype, {
if (decl instanceof AST_SymbolDeclaration) { if (decl instanceof AST_SymbolDeclaration) {
decl.init.forEach(function(init){ decl.init.forEach(function(init){
var tw = new TreeWalker(function(node){ var tw = new TreeWalker(function(node){
if (node instanceof AST_SymbolRef if (node instanceof AST_SymbolRef) {
&& !(node instanceof AST_LabelRef)) {
push_uniq(in_use, node.definition()); push_uniq(in_use, node.definition());
} }
}); });