aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-29 18:58:35 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:20 -0800
commitf6b5cdbbe1d117403bbecf91dfb681bc7006543f (patch)
tree68d45eda6dd9b81f0380140909ffe1f23618d6f6 /src/preamble.js
parent8bfb3cca7094a72e014fd481bcb637e28a77e405 (diff)
atexit gets void(), cxa_atexit gets void(int), support both in asm mode
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 4b65a372..5057a883 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -732,7 +732,12 @@ function callRuntimeCallbacks(callbacks) {
var callback = callbacks.shift();
var func = callback.func;
if (typeof func === 'number') {
- func = {{{ Functions.getTable('v') }}}[func]; // void()
+#if ASM_JS
+ func = {{{ Functions.getTable('v') }}}[func] || // void()
+ {{{ Functions.getTable('vi') }}}[func]; // void(int)
+#else
+ func = {{{ Functions.getTable('x') }}}[func];
+#endif
}
func(callback.arg === undefined ? null : callback.arg);
}