diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/compress.js b/lib/compress.js index 477fa307..444b1d05 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -530,12 +530,11 @@ merge(Compressor.prototype, { tw.safe_ids = save_ids; return true; }); - def(AST_Do, function(tw) { + def(AST_DWLoop, function(tw, descend) { var saved_loop = tw.in_loop; tw.in_loop = this; push(tw); - this.body.walk(tw); - this.condition.walk(tw); + descend(); pop(tw); tw.in_loop = saved_loop; return true; @@ -714,16 +713,6 @@ merge(Compressor.prototype, { } } }); - def(AST_While, function(tw) { - var saved_loop = tw.in_loop; - tw.in_loop = this; - push(tw); - this.condition.walk(tw); - this.body.walk(tw); - pop(tw); - tw.in_loop = saved_loop; - return true; - }); })(function(node, func){ node.DEFMETHOD("reduce_vars", func); }); |