diff options
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 613e7909..c51f2854 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -747,6 +747,14 @@ function JSify(data, functionsOnly, givenFunctions) { if (func.setjmpTable && !ASM_JS) { ret += ' } catch(e) { if (!e.longjmp || !(e.id in mySetjmpIds)) throw(e); setjmpTable[setjmpLabels[e.id]](e.value) }'; } + if (ASM_JS && func.returnType !== 'void') { + // Add a return + if (func.returnType in Runtime.FLOAT_TYPES) { + ret += ' return +0;\n'; + } else { + ret += ' return 0;\n'; + } + } } else { ret += (SHOW_LABELS ? indent + '/* ' + block.entries[0] + ' */' : '') + '\n' + getLabelLines(block.labels[0]); } |