summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-16 17:55:42 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-16 18:13:49 -0800
commitdf2d946238e80e2b3ef6b198301b3947e28646dd (patch)
treecb14736ec0f905d365815a0c8ddafda4cab3152d /src/js
parent797dd8d4119e0b02abd3ddd4d99557d8dfe591e9 (diff)
downloadbinaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.tar.gz
binaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.tar.bz2
binaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.zip
emit a special call to a special import to handle floating-point remainder, which exists in asm.js but not in wasm
Diffstat (limited to 'src/js')
-rw-r--r--src/js/post.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/post.js b/src/js/post.js
index 45d850f10..6406674ba 100644
--- a/src/js/post.js
+++ b/src/js/post.js
@@ -28,6 +28,11 @@
var info = wasmJS['info'] = {
global: null,
env: null,
+ asm2wasm: { // special asm2wasm imports
+ "f64-rem": function(x, y) {
+ return x % y;
+ },
+ },
parent: Module // Module inside wasm-js.cpp refers to wasm-js.cpp; this allows access to the outside program.
};