From d38c949bb3b9c4b6e0d1e2a19cc22ec933b4746e Mon Sep 17 00:00:00 2001 From: Max Graey Date: Sat, 14 Aug 2021 00:56:18 +0300 Subject: [JS/C API] Expose zeroFilledMemory option for JS and C API (#4071) --- src/js/binaryen.js-post.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/js') 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() { -- cgit v1.2.3