summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-08-14 00:56:18 +0300
committerGitHub <noreply@github.com>2021-08-13 14:56:18 -0700
commitd38c949bb3b9c4b6e0d1e2a19cc22ec933b4746e (patch)
treee207521edd9942bcc245403ab5dd05ef2fb74911 /src/js
parent96d2c946329f26bb742684a70cb48e98aa55083d (diff)
downloadbinaryen-d38c949bb3b9c4b6e0d1e2a19cc22ec933b4746e.tar.gz
binaryen-d38c949bb3b9c4b6e0d1e2a19cc22ec933b4746e.tar.bz2
binaryen-d38c949bb3b9c4b6e0d1e2a19cc22ec933b4746e.zip
[JS/C API] Expose zeroFilledMemory option for JS and C API (#4071)
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index d86cb07af..8e41b4e7c 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -3303,6 +3303,16 @@ Module['setLowMemoryUnused'] = function(on) {
Module['_BinaryenSetLowMemoryUnused'](on);
};
+// Gets whether that an imported memory will be zero-initialized speculation.
+Module['getZeroFilledMemory'] = function() {
+ return Boolean(Module['_BinaryenGetZeroFilledMemory']());
+};
+
+// Enables or disables whether that an imported memory will be
+// zero-initialized speculation.
+Module['setZeroFilledMemory'] = function(on) {
+ Module['_BinaryenSetZeroFilledMemory'](on);
+};
// Gets whether fast math optimizations are enabled, ignoring for example
// corner cases of floating-point math like NaN changes.
Module['getFastMath'] = function() {