diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-21 15:41:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-21 15:41:23 -0700 |
commit | bf07641793f10e7c6a003cb8ab4918c4472975a1 (patch) | |
tree | 5b07b59aab4f28d01b6bf3953462230f9beace39 /src | |
parent | 7102046e02fdc97ce7197302b20d50497b3980f0 (diff) | |
parent | 91a245c47ea0c371aa19b8a7c1f2904bd75d5c6c (diff) |
Merge pull request #1195 from inolen/longjmp_signed
trigger setjmp on negative values
Diffstat (limited to 'src')
-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 3f52337f..c1bf1e1a 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1489,7 +1489,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) !== 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; |