AST_Node.DEFMETHOD("print", function(stream, force_parens){
var self = this, generator = self._codegen, prev_use_asm = use_asm;
- if (self instanceof AST_Directive && self.value == "use asm") {
+ if (self instanceof AST_Directive && self.value == "use asm" && stream.parent() instanceof AST_Scope) {
use_asm = true;
}
function doit() {
doit();
}
stream.pop_node();
- if (self instanceof AST_Lambda) {
+ if (self instanceof AST_Scope) {
use_asm = prev_use_asm;
}
});
output.print_string(self.getValue(), self.quote, in_directive);
});
DEFPRINT(AST_Number, function(self, output){
- if (use_asm && self.start.raw != null) {
+ if (use_asm && self.start && self.start.raw != null) {
output.print(self.start.raw);
} else {
output.print(make_num(self.getValue()));
for (var i = 0; i < tests.length; i++) {
assert.strictEqual(
- uglify.minify(tests[i][0], {fromString: true, quote_style: 3, compress: false}).code,
+ uglify.minify(tests[i][0], {fromString: true, quote_style: 3, compress: false, mangle: false}).code,
tests[i][1],
tests[i][0]
);