aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-08-21 11:38:49 +0300
committerMihai Bazon <mihai@bazon.net>2012-08-21 11:38:49 +0300
commit99456c6156f8a05734a82be97348ace72aa1ee2a (patch)
tree284425053132542fe920af3e7fb98f1365685eb2 /lib/output.js
parent458e251d7ed6e9ac97849237264caa40a40c76b3 (diff)
downloadtracifyjs-99456c6156f8a05734a82be97348ace72aa1ee2a.tar.gz
tracifyjs-99456c6156f8a05734a82be97348ace72aa1ee2a.zip
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.
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js
index 748921c7..e6b2dd13 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -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;