summaryrefslogtreecommitdiff
path: root/test/wasm-only.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-12-27 21:42:44 -0500
committerGitHub <noreply@github.com>2016-12-27 21:42:44 -0500
commit575d695762f545e1c2784595d9c926488062f383 (patch)
tree5f18013a7cb2fa39c7a62aa11b2753e86725477c /test/wasm-only.asm.js
parente5704f392404b1f69d762217b89e3b8736277f08 (diff)
parent97968a879d0b55baccb5f72627fca84a6a015356 (diff)
downloadbinaryen-575d695762f545e1c2784595d9c926488062f383.tar.gz
binaryen-575d695762f545e1c2784595d9c926488062f383.tar.bz2
binaryen-575d695762f545e1c2784595d9c926488062f383.zip
Merge pull request #859 from WebAssembly/linking
Dynamic linking
Diffstat (limited to 'test/wasm-only.asm.js')
-rw-r--r--test/wasm-only.asm.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/wasm-only.asm.js b/test/wasm-only.asm.js
index eab63ba2b..cf0119cd7 100644
--- a/test/wasm-only.asm.js
+++ b/test/wasm-only.asm.js
@@ -21,6 +21,9 @@ function asm(global, env, buffer) {
var illegalImport = env.illegalImport;
var illegalImportResult = env.illegalImportResult;
+ var _fabsf = env._fabsf;
+ var do_i64 = env.do_i64;
+
function loads() {
var i = 0, f = fround(0), d = +0;
i = load1(100);
@@ -237,6 +240,13 @@ function asm(global, env, buffer) {
switch64(i64(0)) | 0;
}
+ function __emscripten_dceable_type_decls() { // dce-able, but this defines the type of fabsf which has no other use
+ fround(_fabsf(fround(0.0)));
+ i64(do_i64());
+ }
+
+ var FUNCTION_TABLE_X = [illegalImport, _fabsf, do_i64]; // must stay ok in the table, not legalized, as it will be called internally by the true type
+
return { test64: test64, illegalParam : illegalParam, illegalResult: illegalResult, keepAlive: keepAlive };
}