diff options
author | Chad Austin <chad@chadaustin.me> | 2014-04-24 01:18:32 -0700 |
---|---|---|
committer | Chad Austin <chad@chadaustin.me> | 2014-04-24 01:18:32 -0700 |
commit | 0471c2bf4fbdf9cc407ec01e3cabd04095c843d0 (patch) | |
tree | 2ab102caf8f7fcb33f07da834cd45c87137a4e3e | |
parent | c7b472ab5ac60c67cae8ab95d0363fd328dd4571 (diff) |
enable embind/asm.js tests.
-rw-r--r-- | src/embind/embind.js | 4 | ||||
-rw-r--r-- | tests/test_core.py | 3 | ||||
-rw-r--r-- | tests/test_other.py | 1 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 058bd5c1..c729aff5 100644 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -1,4 +1,4 @@ -/*global Module*/ +/*global Module, asm*/ /*global _malloc, _free, _memcpy*/ /*global FUNCTION_TABLE, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64*/ /*global readLatin1String*/ @@ -721,7 +721,7 @@ function requireFunction(signature, rawFunction) { // - Function.prototype.bind generally benchmarks poorly relative to // function objects, but using 'arguments' would confound JITs and // possibly allocate. - fp = Module['dynCall_' + signature].bind(undefined, rawFunction); + fp = asm['dynCall_' + signature].bind(undefined, rawFunction); } else { fp = FUNCTION_TABLE[rawFunction]; } diff --git a/tests/test_core.py b/tests/test_core.py index 07a7bf77..083d468a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -5633,7 +5633,6 @@ def process(filename): def test_embind(self): if self.emcc_args is None: return self.skip('requires emcc') - if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp') Building.COMPILER_TEST_OPTS += ['--bind'] src = r''' @@ -5656,7 +5655,7 @@ def process(filename): def test_embind_2(self): if self.emcc_args is None: return self.skip('requires emcc') - if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp') + if self.run_name == 'slow2asm': return self.skip('embind/asm.js requires fastcomp') Building.COMPILER_TEST_OPTS += ['--bind', '--post-js', 'post.js'] open('post.js', 'w').write(''' Module.print('lerp ' + Module.lerp(1, 2, 0.66) + '.'); diff --git a/tests/test_other.py b/tests/test_other.py index cdea493a..af522807 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -1880,7 +1880,6 @@ This pointer might make sense in another type signature: i: 0 def test_embind(self): def nonfc(): - if os.environ.get('EMCC_FAST_COMPILER') != '0': return self.skip('todo in fastcomp') for args, fail in [ ([], True), # without --bind, we fail (['--bind'], False), |