From ac078dcb1c677f83527693536cb1c06157095447 Mon Sep 17 00:00:00 2001 From: jgravelle-google Date: Fri, 9 Sep 2016 10:41:00 -0700 Subject: Add flag to s2wasm to export __growWasmMemory function (#696) * Add a flag to s2wasm to export grow_memory Binaryen's wasm.js-post.js calls back in to wasm in order to grow the linear memory, via a function that asm2wasm exports called __growWasmMemory. This changes exposes that method through s2wasm when invoked with a flag. * Move AsmConstWalker from wasm-linker to wasm-emscripten * Add test for memory growth in s2wasm * Move makeDynCallThunks into wasm-emscripten module * Move mutation in getTableSegment into a separate method * Move emscripten metadata generation into wasm-emscripten Also make AsmConstWalker internal to the wasm-emscripten module, as it's only used for the metadata pass. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 38b2df763..0d7b27452 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,7 @@ INSTALL(TARGETS wasm-opt DESTINATION bin) SET(asm2wasm_SOURCES src/tools/asm2wasm.cpp + src/wasm-emscripten.cpp src/wasm.cpp ) ADD_EXECUTABLE(asm2wasm @@ -144,6 +145,7 @@ INSTALL(TARGETS asm2wasm DESTINATION bin) SET(s2wasm_SOURCES src/tools/s2wasm.cpp + src/wasm-emscripten.cpp src/wasm-linker.cpp src/wasm.cpp ) -- cgit v1.2.3