diff options
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 926be71a..856e880c 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1458,11 +1458,12 @@ function JSify(data, functionsOnly, givenFunctions) { }); makeFuncLineActor('unreachable', function(item) { + var ret = ''; + if (ASM_JS && item.funcData.returnType != 'void') ret = 'return ' + asmCoercion('0', item.funcData.returnType) + ';'; if (ASSERTIONS) { - return ASM_JS ? 'abort()' : 'throw "Reached an unreachable!"'; - } else { - return ';'; + ret = (ASM_JS ? 'abort()' : 'throw "Reached an unreachable!"') + ';' + ret; } + return ret || ';'; }); // Final combiner |