summaryrefslogtreecommitdiff
path: root/test/binaryen.js/fast-math.js
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-10-01 15:49:40 +0300
committerGitHub <noreply@github.com>2020-10-01 14:49:40 +0200
commite1a843b15d9939eaa258261f5fed67ea9c493a65 (patch)
tree20ee07241fd721a63bea8f23761ed2a86dcd8a7e /test/binaryen.js/fast-math.js
parent2a935b64dde22671644c4712d0f45e8df60f94eb (diff)
downloadbinaryen-e1a843b15d9939eaa258261f5fed67ea9c493a65.tar.gz
binaryen-e1a843b15d9939eaa258261f5fed67ea9c493a65.tar.bz2
binaryen-e1a843b15d9939eaa258261f5fed67ea9c493a65.zip
Add C and JS APIs for fast math (#3188)
Adds `BinaryenGetFastMath` and `BinaryenSetFastMath` to the C API, respectively `binaryen.getFastMath` and `binaryen.setFastMath` to the JS API.
Diffstat (limited to 'test/binaryen.js/fast-math.js')
-rw-r--r--test/binaryen.js/fast-math.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/binaryen.js/fast-math.js b/test/binaryen.js/fast-math.js
new file mode 100644
index 000000000..48b575b41
--- /dev/null
+++ b/test/binaryen.js/fast-math.js
@@ -0,0 +1,3 @@
+console.log("// fastMath=" + binaryen.getFastMath());
+binaryen.setFastMath(true);
+assert(binaryen.getFastMath() == true);