aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-10-18 15:14:57 +0300
committerMihai Bazon <mihai@bazon.net>2012-10-18 15:14:57 +0300
commitafb7faa6fadee46a6ab46232eddba2121c77549b (patch)
tree5d472b568192e15812dbf74c63790abf78ce984b /lib/ast.js
parent6aa56f92fe07edfc677d390a2e26b37c98da0968 (diff)
downloadtracifyjs-afb7faa6fadee46a6ab46232eddba2121c77549b.tar.gz
tracifyjs-afb7faa6fadee46a6ab46232eddba2121c77549b.zip
more optimizations for some break/continue cases
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 177bd1d7..44cbed12 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -929,10 +929,10 @@ TreeWalker.prototype = {
} else {
for (var i = stack.length; --i >= 0;) {
var x = stack[i];
- if (x instanceof AST_Switch) return x;
- if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) {
- return (x.body instanceof AST_BlockStatement ? x.body : x);
- }
+ if (x instanceof AST_Switch
+ || x instanceof AST_For
+ || x instanceof AST_ForIn
+ || x instanceof AST_DWLoop) return x;
}
}
}