self.walk(tw);
// pass 2: find back references and eval
- var func = null;
- var globals = self.globals = new Dictionary();
+ self.globals = new Dictionary();
var tw = new TreeWalker(function(node, descend){
- if (node instanceof AST_Lambda) {
- var prev_func = func;
- func = node;
- descend();
- func = prev_func;
- return true;
- }
if (node instanceof AST_LoopControl && node.label) {
node.label.thedef.references.push(node);
return true;
});
// labels are always mangleable
-AST_Label.DEFMETHOD("unmangleable", function(){
- return false;
-});
+AST_Label.DEFMETHOD("unmangleable", return_false);
AST_Symbol.DEFMETHOD("unreferenced", function(){
return this.definition().references.length == 0
return this.definition().undeclared;
});
-AST_LabelRef.DEFMETHOD("undeclared", function(){
- return false;
-});
+AST_LabelRef.DEFMETHOD("undeclared", return_false);
-AST_Label.DEFMETHOD("undeclared", function(){
- return false;
-});
+AST_Label.DEFMETHOD("undeclared", return_false);
AST_Symbol.DEFMETHOD("definition", function(){
return this.thedef;