summaryrefslogtreecommitdiff
path: root/src/tools/s2wasm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* s2wasm: Add command line option for importing memory (#963)Max Klein2017-04-121-1/+7
| | | | | | This option allows to import the linear memory from JS code instead of exporting it. --emscripten-glue does this too but often the emscripten glue isn't needed, so this option only affects the memory. All the code necessary for importing the memory basically already exists, so nothing except for the command line option itself had to be added.
* Import memory instead of defining/exporting it when using emscripten glue (#777)Derek Schuff2016-10-141-1/+2
| | | | | The emscripten JS module code creates the memory using the native wasm APIs, and imports that into the wasm module.
* Add flag to s2wasm to export __growWasmMemory function (#696)jgravelle-google2016-09-091-0/+16
| | | | | | | | | | | | | | | | | | | | | * 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.
* Add mode to wasm validator to check for web-environment constraints (#584)Derek Schuff2016-06-141-8/+15
| | | | | | | In the web embedding, modules are not allowed to import or export functions which have i64 params or return values. Add a mode to the validator to check for this, and add flags to s2wasm and wasm-as to enable or disable this check. Also add tests.
* s2wasm: Validate the result module (#574)Derek Schuff2016-06-101-0/+13
| | | | Add an s2wasm option `--no-validate` to disable validation for debugging purposes. Also fix several validation errors by adding calls to `finalize()` after creating expressions, and ensuring that an import is created earlier in `Linker::getImportThunk`.
* don't emit an extra endline in s2wasm (#506) (#508)Alon Zakai2016-05-161-1/+1
|
* move console tool sources into src/tools (#490)Alon Zakai2016-05-121-0/+140