aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kelly <ryan@rfk.id.au>2014-01-28 17:22:54 +1100
committerRyan Kelly <ryan@rfk.id.au>2014-01-28 17:22:54 +1100
commit08077d5b5f32366e378e45417c1b5f320a5b37e2 (patch)
tree28e5e5e63087caf1f2704b8c96f87121c475002b
parent87758abf9f56473b5da6945a5d7e020e2ead1bd5 (diff)
Fix assertion that all switch-cases break.
-rw-r--r--tools/js-optimizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 21d521fd..a67af7d0 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -2486,7 +2486,7 @@ function registerizeHarder(ast) {
for (var j = 0; j < node[2][i][1].length; j++) {
buildFlowGraph(node[2][i][1][j]);
}
- if (currEntryJunction !== null, 'switch case body did not break');
+ assert(currEntryJunction === null, 'switch case body did not break');
}
// If there was no default case, we also need an empty block
// linking straight from the test evaluation to the exit.