diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 18:33:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-08 18:33:57 -0800 |
commit | a56faae8d1837ef68eaba2db8e36cc390f1a94ec (patch) | |
tree | a06fa8fed85fdf9d820cfa1e9d3d86dc374ec4b9 | |
parent | ca34054b840a33abb5d6490674232fab73cdeb16 (diff) |
ignore unreachable
-rw-r--r-- | src/jsifier.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 8fcac49c..cd5beda1 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -9,6 +9,7 @@ var STRUCT_LIST = set('struct', 'list'); var UNDERSCORE_OPENPARENS = set('_', '('); +var RELOOP_IGNORED_LASTS = set('return', 'unreachable'); // JSifier function JSify(data, functionsOnly, givenFunctions) { @@ -657,7 +658,7 @@ function JSify(data, functionsOnly, givenFunctions) { Relooper.addBranch(blockMap[ident], blockMap[last.labelTrue], last.valueJS, relevant(last.labelTrueJS)); Relooper.addBranch(blockMap[ident], blockMap[last.labelFalse], 0, relevant(last.labelFalseJS)); } - } else if (last.intertype == 'return') { + } else if (last.intertype in RELOOP_IGNORED_LASTS) { } else { throw 'unknown reloop last line: ' + last.intertype; } |