added mangler and other stuff

This commit is contained in:
Mihai Bazon
2012-08-20 17:19:30 +03:00
parent 1fe0ff9fff
commit 458e251d7e
5 changed files with 208 additions and 63 deletions

View File

@@ -804,12 +804,20 @@ function OutputStream(options) {
DEFPRINT(AST_Symbol, function(self, output){
output.print_name(self.name);
});
DEFPRINT(AST_SymbolDeclaration, function(self, output){
output.print_name(self.mangled_name || self.name);
});
DEFPRINT(AST_SymbolRef, function(self, output){
var def = self.symbol;
if (def) {
def.print(output);
} else {
output.print_name(self.name);
}
});
DEFPRINT(AST_This, function(self, output){
output.print("this");
});
DEFPRINT(AST_Label, function(self, output){
output.print_name(self.name);
});
DEFPRINT(AST_Constant, function(self, output){
output.print(self.getValue());
});