aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-11 15:42:28 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-11 15:42:28 +0300
commit8e82d8d94cd60f7423ee61032a30a35222680dc3 (patch)
treeac239b824ebf268ffae0444900a489ababd40ea7 /lib/output.js
parentda407d46c65eeaf4599b0b50fc0a8ab6ba28ecdf (diff)
downloadtracifyjs-8e82d8d94cd60f7423ee61032a30a35222680dc3.tar.gz
tracifyjs-8e82d8d94cd60f7423ee61032a30a35222680dc3.zip
fixed some mess with symbols/scope
- all symbols now have a `thedef` property which is a SymbolDef object, instead of the `uniq` that we had before (pointing to the first occurrence of the name as declaration). - for undeclared symbols we still create a SymbolDef object in the toplevel scope but mark it "undeclared" - we can now call figure_out_scope after squeezing, which is useful in order not to mangle names that were dropped by the squeezer
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/output.js b/lib/output.js
index 35c7ade7..25718816 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -884,16 +884,9 @@ function OutputStream(options) {
self.value._do_print(output, true);
});
DEFPRINT(AST_Symbol, function(self, output){
- output.print_name(self.name);
- });
- DEFPRINT(AST_SymbolDeclaration, function(self, output){
var def = self.definition();
output.print_name(def.mangled_name || def.name);
});
- DEFPRINT(AST_SymbolRef, function(self, output){
- var def = self.symbol;
- output.print_name(def ? def.mangled_name || def.name : self.name);
- });
DEFPRINT(AST_This, function(self, output){
output.print("this");
});