Fix output for "use asm" code from SpiderMonkey AST

(will only work properly if the SM tree contains "raw" properties for
Literal number nodes)
This commit is contained in:
Mihai Bazon
2015-11-12 12:18:25 +02:00
parent c898a26117
commit 08623aa6a7
4 changed files with 18 additions and 8 deletions

View File

@@ -1178,8 +1178,8 @@ function OutputStream(options) {
output.print_string(self.getValue(), self.quote);
});
DEFPRINT(AST_Number, function(self, output){
if (use_asm) {
output.print(self.start.literal);
if (use_asm && self.start.raw != null) {
output.print(self.start.raw);
} else {
output.print(make_num(self.getValue()));
}