From 547e2be14d1f8f9b21905baee87b1946045b0fe7 Mon Sep 17 00:00:00 2001 From: Max Graey Date: Thu, 27 Aug 2020 05:27:41 +0300 Subject: Add allowHeavyweight inlining option (#3032) As discussed in #2921, this allows inlining of functions not identified as "lightweight" (that include a loop, for example). --- src/js/binaryen.js-post.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/js/binaryen.js-post.js') diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index a9244c2d2..f8a0b8590 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -3030,6 +3030,16 @@ Module['setOneCallerInlineMaxSize'] = function(size) { Module['_BinaryenSetOneCallerInlineMaxSize'](size); }; +// Gets the value which allow inline functions that are not "lightweight". +Module['getAllowHeavyweight'] = function() { + return Module['_BinaryenGetAllowHeavyweight'](); +}; + +// Sets the value which allow inline functions that are not "lightweight". +Module['setAllowHeavyweight'] = function(value) { + Module['_BinaryenSetAllowHeavyweight'](value); +}; + // Expression wrappers // Makes a wrapper class with the specified static members while -- cgit v1.2.3