diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-17 20:10:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-17 20:10:46 -0700 |
commit | 5d82a4c77304f6fcd164d73fbad6c0f3c9a43daf (patch) | |
tree | 609ef3f7f107011c2b1b0cfe479206eaacf06542 | |
parent | 823cd26725e2108141c3fec7b76c47288c6fd532 (diff) |
emit landingpad variable assignment to avoid errors, even when exceptions are disabled
-rw-r--r-- | src/jsifier.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 8281f895..a4dd797b 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1210,10 +1210,11 @@ function JSify(data, functionsOnly, givenFunctions) { } }); makeFuncLineActor('landingpad', function(item) { - if (DISABLE_EXCEPTION_CATCHING) { + if (DISABLE_EXCEPTION_CATCHING && USE_TYPED_ARRAYS == 2) { + ret = makeVarDef(item.assignTo) + '$0 = 0; ' + item.assignTo + '$1 = 0;'; item.assignTo = null; if (ASSERTIONS) warnOnce('landingpad, but exceptions are disabled!'); - return ';' + return ret; } var catchTypeArray = item.catchables.map(finalizeLLVMParameter).map(function(element) { return asmCoercion(element, 'i32') }).join(','); var ret = asmCoercion('___cxa_find_matching_catch(-1, -1' + (catchTypeArray.length > 0 ? ',' + catchTypeArray : '') +')', 'i32'); |