aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-12 15:52:13 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-12 15:52:13 -0700
commit94aa7b917086053fbf4f6125daad8bb1bd889190 (patch)
treeea0d52a00a5a3e38f9f2dc58cefa26406c6114f8
parentaeb63def9502e56437b74e222739c36af0b9c72f (diff)
coerce arguments to cxa_find_matching_catch; enable remaining asm.js exceptions tests
-rw-r--r--src/jsifier.js2
-rwxr-xr-xtests/runner.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index fb5e9a5f..262dd3eb 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1210,7 +1210,7 @@ function JSify(data, functionsOnly, givenFunctions) {
}
});
makeFuncLineActor('landingpad', function(item) {
- var catchTypeArray = item.catchables.map(finalizeLLVMParameter).join(',');
+ 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) {
ret = makeVarDef(item.assignTo) + '$0 = ' + ret + '; ' + item.assignTo + '$1 = tempRet0;';
diff --git a/tests/runner.py b/tests/runner.py
index def4bfc9..890d42e7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2646,7 +2646,6 @@ Exception execution path of first function! 1
self.do_run(src, 'success')
def test_typed_exceptions(self):
- if Settings.ASM_JS: return self.skip('no exceptions support in asm')
Settings.DISABLE_EXCEPTION_CATCHING = 0
Settings.SAFE_HEAP = 0 # Throwing null will cause an ignorable null pointer access.
src = open(path_from_root('tests', 'exceptions', 'typed.cpp'), 'r').read()
@@ -2654,7 +2653,6 @@ Exception execution path of first function! 1
self.do_run(src, expected)
def test_multiexception(self):
- if Settings.ASM_JS: return self.skip('no exceptions support in asm')
Settings.DISABLE_EXCEPTION_CATCHING = 0
src = r'''
#include <stdio.h>