summaryrefslogtreecommitdiff
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* Fix bustage (#975)Alon Zakai2017-04-181-0/+5
| | | | | | * support -g in wasm-opt, which makes it easier to upgrade binaries for bustage * upgrade binaries in test/merge to new names section format
* wasm-merge tool (#919)Alon Zakai2017-04-171-0/+639
| | | | wasm-merge tool: combines two wasm files into a larger one, handling collisions, and aware of the dynamic linking conventions. it does not do full static linking, but may eventually.
* 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.
* Wasm h to cpp (#926)jgravelle-google2017-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Move WasmType function implementations to wasm.cpp * Move Literal methods to wasm.cpp * Reorder wasm.cpp shared constants back to top * Move expression functions to wasm.cpp * Finish moving things to wasm.cpp * Split out Literal into its own .h/.cpp. Also factor out common wasm-type module * Remove unneeded/transitive includes from wasm.h * Add comment to try/check methods * Rename tryX/checkX methods to getXOrNull * Add missing include that should fix appveyor build breakage * More appveyor
* Use 3 modes for potentially trapping ops in asm2wasm (#929)Alon Zakai2017-03-071-5/+17
| | | * use 3 modes for potentially trapping ops in asm2wasm: allow (just emit a potentially trapping op), js (do exactly what js does, even if it takes a slow ffi to do it), and clamp (avoid the trap by clamping as necessary)
* Fixes compilation error on clang (#925)Kazuki Oikawa2017-02-271-1/+1
|
* asm2wasm debuginfo (#895)Alon Zakai2017-02-071-2/+10
| | | | | | | | | | | | * parse file/line comments in asm.js into debug intrinsics * convert debug intrinsics into annotations, and print them * ignore --debuginfo if not emitting text, as wasm binaries don't support that yet * emit full debug info when -g and emitting text; when -g and emitting binary, all we can do is the Names section * update wasm.js
* Improve handling of implicit traps (#898)Alon Zakai2017-02-061-7/+6
| | | | | | | | * add --ignore-implicit-traps option, and by default do not ignore them, to properly preserve semantics * implicit traps can be reordered, but are side effects and should not be removed * add testing for --ignore-implicit-traps
* Remove unused captures to fix warnings/errors when compiling with Clang (#896)Eric Holk2017-02-031-2/+1
|
* Read/Write Abstraction (#889)Alon Zakai2017-01-262-13/+39
| | | | | * Added ModuleReader/Writer classes that support text and binary I/O * Use them in wasm-opt and asm2wasm
* add table-max option, and make it and mem-max set the limit to no limit for -1Alon Zakai2016-12-071-2/+21
|
* add --mem-max option to set the maximum size of memory, overriding the ↵Alon Zakai2016-11-111-0/+10
| | | | default (which is the normal size of memory if no growth, or infinity if growth) (#837)
* add a --symbolmap option to wasm-as, which emits a side file with the name ↵Alon Zakai2016-11-091-0/+5
| | | | mapping (similar to Names section, but external)
* add a pass to optimize memory segments, and pack memory in asm2wasmAlon Zakai2016-11-011-0/+5
|
* add a --memory-base options to asm2wasm, to fix the memory base instead of ↵Alon Zakai2016-10-311-1/+12
| | | | depending on an import
* Add -O0,-O1,etc. options (#790)Alon Zakai2016-10-193-23/+101
| | | | And use them in wasm-opt and asm2wasm consistently and uniformly.
* Pass options (#788)Alon Zakai2016-10-181-2/+16
| | | | * add PassOptions structure, and use it for new -Os param to wasm-opt
* 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.
* Refactor Import::Kind and Export::Kind into an ExternalKind enum class (#725)Alon Zakai2016-10-031-2/+2
|
* passRunner debug and validation improvements (#726)Alon Zakai2016-10-021-5/+0
|
* asm2wasm i64 support (#723)Alon Zakai2016-09-301-1/+6
| | | | | | | | | | | | * support i64 intrinsics from fastcomp, adding --wasm-only flag * refactor callImport logic in asm2wasm to avoid recomputing wasm types again * legalize illegal i64 params in exports and imports * do safe i64 binary ops depending on precision * fix addVar, only assert on names if we are using a name
* Make wasm-as emit the names section/debug info only with -g (#705)Alon Zakai2016-09-261-0/+5
|
* error on putting spectest.print in a tableAlon Zakai2016-09-211-0/+11
|
* validate spectest.print as a functionAlon Zakai2016-09-201-1/+7
|
* global importing fixes: use the right counter for globals and for functionsAlon Zakai2016-09-201-1/+12
|
* support module operations in shell testsAlon Zakai2016-09-171-28/+55
|
* support assert_malformed in shell test runnerAlon Zakai2016-09-161-1/+6
|
* 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.
* import memoryBase and tableBaseAlon Zakai2016-09-071-9/+1
|
* add asm2wasm option to import a mem init fileAlon Zakai2016-09-071-1/+23
| | | | | | | | apply memory segments only if there isn't a memory initializer (which we need for asmjs and asm2wasm modes) use wasm-opt to check recreated wasts for validity, as wasm-shell would try to execute them add testing for combined modes like asmjs,interpret-binary
* use globals in asm2wasmAlon Zakai2016-09-071-11/+1
|
* wasm-shell improvements: print out which module is built, add option to skip ↵Alon Zakai2016-09-071-2/+27
| | | | lines
* better printing when assert_invalids failAlon Zakai2016-09-071-1/+7
|
* validate properly in wasm-optAlon Zakai2016-07-131-1/+4
|
* separate wasm-opt out from wasm-shell: opt optimizes, shell runs wast shell ↵Alon Zakai2016-07-133-46/+103
| | | | tests
* rename binaryen-shell to wasm-shellAlon Zakai2016-07-131-1/+1
|
* print line numbers when running tests in shellAlon Zakai2016-07-061-1/+4
|
* prefix make_unique in binaryen_shell for visual studio workarounds (#595)Alon Zakai2016-06-231-4/+4
|
* support -o in binaryen-shell (#592)Alon Zakai2016-06-181-0/+9
|
* refactor interpreter code to provide expression executors for both ↵Alon Zakai2016-06-181-2/+2
| | | | standalone and full funtime execution
* Add mode to wasm validator to check for web-environment constraints (#584)Derek Schuff2016-06-142-14/+40
| | | | | | | 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`.
* use WASM_UNUSED in some places to fix compiler warning/error on unused ↵Alon Zakai2016-06-081-0/+1
| | | | variables we only use in asserts (#579)
* add OptimizingIncrementalModuleBuilder for faster incremental module ↵Alon Zakai2016-06-021-6/+1
| | | | building + optimizing
* catch parse exceptions in s-parsing tooAlon Zakai2016-05-241-38/+39
|
* validate after running passes in shellAlon Zakai2016-05-231-0/+1
|
* Merge pull request #507 from WebAssembly/coalesce-localsAlon Zakai2016-05-161-1/+1
|\ | | | | Coalesce locals
| * add cfg-building traversal and a pass to coalesce locals using itAlon Zakai2016-05-151-1/+1
| |
* | 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-125-0/+637