aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-11 21:22:49 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-11 21:22:49 -0700
commitf54d0e6ccbbb702db125d8c9f86190cf37cfee0c (patch)
treeea7801d63b7a18e7bced6d0f5d1804fb1555f062 /src/jsifier.js
parent9e7a712c6b6186792f186ed6bd6d6af31d36a434 (diff)
avoid unnecessary array creation in cxa_find_matching_catch calls
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index af07539f..2a9dc5bd 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1211,7 +1211,7 @@ function JSify(data, functionsOnly, givenFunctions) {
});
makeFuncLineActor('landingpad', function(item) {
var catchTypeArray = item.catchables.map(finalizeLLVMParameter).join(',');
- var ret = '___cxa_find_matching_catch('+ makeGetValue('_llvm_eh_exception.buf', '0', 'void*') +',' + makeGetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'void*') + ',[' + catchTypeArray +'])';
+ var ret = '___cxa_find_matching_catch('+ makeGetValue('_llvm_eh_exception.buf', '0', 'void*') +',' + makeGetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'void*') + (catchTypeArray.length > 0 ? ',' + catchTypeArray : '') +')';
if (USE_TYPED_ARRAYS == 2) {
ret = makeVarDef(item.assignTo) + '$0 = ' + ret + '; ' + item.assignTo + '$1 = tempRet0;';
item.assignTo = null;