summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2020-02-13 22:48:12 +0100
committerGitHub <noreply@github.com>2020-02-13 13:48:12 -0800
commit32bb67f4660de4b5b03bdff5c9c59ab92f8a0049 (patch)
treebef65081c9ef8ae285addbcb76e44477d11eb2c0 /src/js/binaryen.js-post.js
parent41e9d4b244986149603ad83a4f526d950b3a441b (diff)
downloadbinaryen-32bb67f4660de4b5b03bdff5c9c59ab92f8a0049.tar.gz
binaryen-32bb67f4660de4b5b03bdff5c9c59ab92f8a0049.tar.bz2
binaryen-32bb67f4660de4b5b03bdff5c9c59ab92f8a0049.zip
Add C-/JS-APIs for inlining options (#2655)
Allows a user to modify the inlining limits using the C- and JS-APIs. * binaryen.**getAlwaysInlineMaxSize**(): `number` * binaryen.**setAlwaysInlineMaxSize**(size: `number`): `void` * binaryen.**getFlexibleInlineMaxSize**(): `number` * binaryen.**setFlexibleInlineMaxSize**(size: `number`): `void` * binaryen.**getOneCallerInlineMaxSize**(): `number` * binaryen.**setOneCallerInlineMaxSize**(size: `number`): `void`
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index d41e9575b..3ef19fd7d 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -2928,6 +2928,36 @@ Module['clearPassArguments'] = function() {
Module['_BinaryenClearPassArguments']();
};
+// Gets the function size at which we always inline.
+Module['getAlwaysInlineMaxSize'] = function() {
+ return Module['_BinaryenGetAlwaysInlineMaxSize']();
+};
+
+// Sets the function size at which we always inline.
+Module['setAlwaysInlineMaxSize'] = function(size) {
+ Module['_BinaryenSetAlwaysInlineMaxSize'](size);
+};
+
+// Gets the function size which we inline when functions are lightweight.
+Module['getFlexibleInlineMaxSize'] = function() {
+ return Module['_BinaryenGetFlexibleInlineMaxSize']();
+};
+
+// Sets the function size which we inline when functions are lightweight.
+Module['setFlexibleInlineMaxSize'] = function(size) {
+ Module['_BinaryenSetFlexibleInlineMaxSize'](size);
+};
+
+// Gets the function size which we inline when there is only one caller.
+Module['getOneCallerInlineMaxSize'] = function() {
+ return Module['_BinaryenGetOneCallerInlineMaxSize']();
+};
+
+// Sets the function size which we inline when there is only one caller.
+Module['setOneCallerInlineMaxSize'] = function(size) {
+ Module['_BinaryenSetOneCallerInlineMaxSize'](size);
+};
+
// Enables or disables C-API tracing
Module['setAPITracing'] = function(on) {
return Module['_BinaryenSetAPITracing'](on);