summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2020-08-27 05:27:41 +0300
committerGitHub <noreply@github.com>2020-08-26 19:27:41 -0700
commit547e2be14d1f8f9b21905baee87b1946045b0fe7 (patch)
tree1f3381dd71eab93424571adaf33367deafbb4b46 /src/js/binaryen.js-post.js
parenta61b9dff9be3da4d4c56f92f494e5f2914f32e1e (diff)
downloadbinaryen-547e2be14d1f8f9b21905baee87b1946045b0fe7.tar.gz
binaryen-547e2be14d1f8f9b21905baee87b1946045b0fe7.tar.bz2
binaryen-547e2be14d1f8f9b21905baee87b1946045b0fe7.zip
Add allowHeavyweight inlining option (#3032)
As discussed in #2921, this allows inlining of functions not identified as "lightweight" (that include a loop, for example).
Diffstat (limited to 'src/js/binaryen.js-post.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 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