diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/binaryen-c.cpp | 4 | ||||
-rw-r--r-- | src/binaryen-c.h | 8 | ||||
-rw-r--r-- | src/js/binaryen.js-post.js | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 6776b785c..db9258d59 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -3528,11 +3528,11 @@ void BinaryenSetOneCallerInlineMaxSize(BinaryenIndex size) { globalPassOptions.inlining.oneCallerInlineMaxSize = size; } -bool BinaryenGetAllowHeavyweight(void) { +int BinaryenGetAllowHeavyweight(void) { return globalPassOptions.inlining.allowHeavyweight; } -void BinaryenSetAllowHeavyweight(bool enabled) { +void BinaryenSetAllowHeavyweight(int enabled) { globalPassOptions.inlining.allowHeavyweight = enabled; } diff --git a/src/binaryen-c.h b/src/binaryen-c.h index d064ceb5c..6239befd2 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -2124,6 +2124,14 @@ BINARYEN_API BinaryenIndex BinaryenGetOneCallerInlineMaxSize(void); // Applies to all modules, globally. BINARYEN_API void BinaryenSetOneCallerInlineMaxSize(BinaryenIndex size); +// Gets whether heavyweight functions are allowed to be inlined. +// Applies to all modules, globally. +BINARYEN_API int BinaryenGetAllowHeavyweight(void); + +// Sets whether heavyweight functions are allowed to be inlined. +// Applies to all modules, globally. +BINARYEN_API void BinaryenSetAllowHeavyweight(int enabled); + // Runs the specified passes on the module. Uses the currently set global // optimize and shrink level. BINARYEN_API void BinaryenModuleRunPasses(BinaryenModuleRef module, diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index f8a0b8590..057252f78 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -3032,7 +3032,7 @@ Module['setOneCallerInlineMaxSize'] = function(size) { // Gets the value which allow inline functions that are not "lightweight". Module['getAllowHeavyweight'] = function() { - return Module['_BinaryenGetAllowHeavyweight'](); + return Boolean(Module['_BinaryenGetAllowHeavyweight']()); }; // Sets the value which allow inline functions that are not "lightweight". |