sym.fixed = d.fixed = eq ? function() {
return node.right;
} : function() {
- return make_node(AST_Binary, node, {
+ var value = fixed instanceof AST_Node ? fixed : fixed();
+ return value && make_node(AST_Binary, node, {
operator: node.operator.slice(0, -1),
- left: fixed instanceof AST_Node ? fixed : fixed(),
+ left: value,
right: node.right
});
};
var fixed = d.fixed;
if (!fixed) return;
exp.fixed = d.fixed = function() {
- return make_node(AST_Binary, node, {
+ var value = fixed instanceof AST_Node ? fixed : fixed();
+ return value && make_node(AST_Binary, node, {
operator: node.operator.slice(0, -1),
left: make_node(AST_UnaryPrefix, node, {
operator: "+",
- expression: fixed instanceof AST_Node ? fixed : fixed()
+ expression: value
}),
right: make_node(AST_Number, node, {
value: 1
}
}
} else {
- uglify_code = uglify_code.error;
+ uglify_code = uglify_result = uglify_code.error;
ok = sandbox.same_stdout(original_result, uglify_result);
}
if (verbose || (verbose_interval && !(round % INTERVAL_COUNT)) || !ok) log(options);