diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-17 14:23:31 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-17 14:23:31 -0700 |
commit | 04f049f828707272fb13e08955b14f088699ef68 (patch) | |
tree | 9197ad7301cbdb8fa4778daa30e712edc5ef5468 | |
parent | 00acb94c2b3c9e9b12be5930b3c897412fbc4573 (diff) |
do not emit landingpad call to cxa_find_matching_catch if exceptions are disabled
-rw-r--r-- | src/jsifier.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 856e880c..8281f895 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1210,6 +1210,11 @@ function JSify(data, functionsOnly, givenFunctions) { } }); makeFuncLineActor('landingpad', function(item) { + if (DISABLE_EXCEPTION_CATCHING) { + item.assignTo = null; + if (ASSERTIONS) warnOnce('landingpad, but exceptions are disabled!'); + return ';' + } 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'); if (USE_TYPED_ARRAYS == 2) { |