diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/js/binaryen.js-post.js | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6075f20dd..d3b2f270c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -418,6 +418,8 @@ if(EMSCRIPTEN) target_link_libraries(binaryen_wasm "-mbulk-memory") target_link_libraries(binaryen_wasm optimized "--closure=1") target_link_libraries(binaryen_wasm optimized "--closure-args=\"--language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6\"") + # TODO: Fix closure warnings! (#5062) + target_link_libraries(binaryen_wasm optimized "-Wno-error=closure") target_link_libraries(binaryen_wasm optimized "-flto") target_link_libraries(binaryen_wasm debug "--profiling") install(TARGETS binaryen_wasm DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -463,6 +465,8 @@ if(EMSCRIPTEN) else() target_link_libraries(binaryen_js optimized "--closure-args=\"--language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6\"") endif() + # TODO: Fix closure warnings! (#5062) + target_link_libraries(binaryen_js optimized "-Wno-error=closure") target_link_libraries(binaryen_js optimized "-flto") target_link_libraries(binaryen_js debug "--profiling") target_link_libraries(binaryen_js debug "-sASSERTIONS") diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 2568c6093..c1c3aedd9 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -2567,7 +2567,7 @@ function wrapModule(module, self = {}) { self['removeExport'] = function(externalName) { return preserveStack(() => Module['_BinaryenRemoveExport'](module, strToStack(externalName))); }; - self['setMemory'] = function(initial, maximum, exportName, segments = [], shared = false, memory64 = false, internalName) { + self['setMemory'] = function(initial, maximum, exportName, segments = [], shared = false, memory64 = false, internalName = null) { // segments are assumed to be { passive: bool, offset: expression ref, data: array of 8-bit data } return preserveStack(() => { const segmentsLen = segments.length; @@ -3560,6 +3560,9 @@ const thisPtr = Symbol(); // Makes a specific expression wrapper class with the specified static members // while automatically deriving instance methods and accessors. function makeExpressionWrapper(ownStaticMembers) { + /** + * @constructor + */ function SpecificExpression(expr) { // can call the constructor without `new` if (!(this instanceof SpecificExpression)) { |