more fixes:

- added walker for AST_ObjectProperty
- handle redefinitions properly (only mangle one symbol, make them all point
  to a single definition)

DynarchLIB seems to run fine after mangling + compressed output.
This commit is contained in:
Mihai Bazon
2012-08-21 11:38:49 +03:00
parent 458e251d7e
commit 99456c6156
4 changed files with 64 additions and 29 deletions

View File

@@ -707,8 +707,9 @@ function OutputStream(options) {
var expr = self.expression;
expr.print(output);
if (expr instanceof AST_Number) {
if (!/[xa-f.]/i.test(output.last()))
if (!/[xa-f.]/i.test(output.last())) {
output.print(".");
}
}
output.print(".");
output.print_name(self.property);
@@ -805,7 +806,11 @@ function OutputStream(options) {
output.print_name(self.name);
});
DEFPRINT(AST_SymbolDeclaration, function(self, output){
output.print_name(self.mangled_name || self.name);
if (self.uniq) {
self.uniq.print(output);
} else {
output.print_name(self.mangled_name || self.name);
}
});
DEFPRINT(AST_SymbolRef, function(self, output){
var def = self.symbol;