diff options
author | Anthony Pesch <anthony@usamp.com> | 2013-05-19 19:20:46 -0700 |
---|---|---|
committer | Anthony Pesch <anthony@usamp.com> | 2013-05-19 19:20:46 -0700 |
commit | 0a1cb8b8d74458d4de2e2d3830680c4f48da0278 (patch) | |
tree | dc6d5c04abb2b50c6a949b5c94652361552b601f /src/jsifier.js | |
parent | fc41fce2f5e9ac88939bb55d3391fbedbaafbf6a (diff) |
trigger setjmp on negative values
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 8270b443..f93579a8 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1488,7 +1488,7 @@ function JSify(data, functionsOnly, givenFunctions) { if (ASM_JS && funcData.setjmpTable) { // check if a longjmp was done. If a setjmp happened, check if ours. If ours, go to -111 to handle it. // otherwise, just return - the call to us must also have been an invoke, so the setjmp propagates that way - ret += '; if (((__THREW__|0) != 0) & ((threwValue|0) > 0)) { setjmpLabel = ' + asmCoercion('_testSetjmp(' + makeGetValue('__THREW__', 0, 'i32') + ', setjmpTable)', 'i32') + '; if ((setjmpLabel|0) > 0) { label = -1111; break } else return ' + (funcData.returnType != 'void' ? asmCoercion('0', funcData.returnType) : '') + ' } __THREW__ = threwValue = 0;\n'; + ret += '; if (((__THREW__|0) != 0) & (threwValue|0)) { setjmpLabel = ' + asmCoercion('_testSetjmp(' + makeGetValue('__THREW__', 0, 'i32') + ', setjmpTable)', 'i32') + '; if ((setjmpLabel|0) > 0) { label = -1111; break } else return ' + (funcData.returnType != 'void' ? asmCoercion('0', funcData.returnType) : '') + ' } __THREW__ = threwValue = 0;\n'; } return ret; |