diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index f2269a2f..1a54c75e 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -223,6 +223,7 @@ merge(Compressor.prototype, { AST_Node.DEFMETHOD("reset_opt_flags", function(compressor, rescan){ var reduce_vars = rescan && compressor.option("reduce_vars"); + var ie8 = !compressor.option("screw_ie8"); var safe_ids = []; push(); var suppressor = new TreeWalker(function(node) { @@ -232,7 +233,7 @@ merge(Compressor.prototype, { d.fixed = false; } }); - var tw = new TreeWalker(function(node){ + var tw = new TreeWalker(function(node, descend){ if (!(node instanceof AST_Directive || node instanceof AST_Constant)) { node._squeezed = false; node._optimized = false; @@ -247,6 +248,9 @@ merge(Compressor.prototype, { d.fixed = false; } } + if (ie8 && node instanceof AST_SymbolCatch) { + node.definition().fixed = false; + } if (node instanceof AST_VarDef) { var d = node.name.definition(); if (d.fixed === undefined) { @@ -301,6 +305,12 @@ merge(Compressor.prototype, { pop(); return true; } + if (node instanceof AST_Catch) { + push(); + descend(); + pop(); + return true; + } } }); this.walk(tw); |