summaryrefslogtreecommitdiff
path: root/test/wasm2js
Commit message (Collapse)AuthorAgeFilesLines
* Optimize away sets of the same local (#1940)Alon Zakai2019-03-0733-878/+84
|
* Optimize added constants with propagation only if we see we will remove all ↵Alon Zakai2019-03-0612-50/+37
| | | | uses of the original add, as otherwise we may just be adding work (both an offset, and an add). Refactor local-utils.h, and make UnneededSetRemover also check for side effects, so it cleanly removes all traces of unneeded sets.
* Validate unique local names, and use validation in wasm2js. Fixes #1885 (#1886)Alon Zakai2019-01-232-3/+3
| | | | | * Also fixes some bugs in wasm2js tests that did not validate. * Rename FeatureOptions => ToolOptions, as they now contain all the basic stuff each tool needs for commandline options (validation yes or no, and which features if so).
* Massive renaming (#1855)Thomas Lively2019-01-0720-271/+271
| | | | | | Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
* Fix i64 select lowering. (#1773)Yury Delendik2018-12-174-9/+85
|
* Reject all nonexistent instructions in sexp format (#1756)Thomas Lively2018-11-191-2/+2
|
* Generate sexp instruction parser (#1754)Thomas Lively2018-11-191-1/+1
| | | Also fix broken tests surfaced by the new parser.
* ReFinalize fix (#1742)Alon Zakai2018-11-141-10/+6
| | | | | | | Handle a corner case in ReFinalize, which incrementally re-types code after changes. The problem is that if we need to figure out the type of a block, we look to the last element flowing out, or to breaks with values. If there is no such last element, and the breaks are not taken - they have unreachable values - then they don't tell us the block's proper type. We asserted that in such a case the block still had a type, and didn't handle this. To fix it, we could look on the parent to see what type would fit. However, it seem simpler to just remove untaken breaks/switches as part of ReFinalization - they carry no useful info anyhow. After removing them, if the block has no other signal of a concrete type, it can just be unreachable. This bug existed for at least 1.5 years - I didn't look back further. I think it was noticed by the fuzzer now due to recent fuzzing improvements and optimizer improvements, as I just saw this bug found a second time.
* Support 4GB Memories (#1702)Alon Zakai2018-10-152-2/+2
| | | This fixes asm2wasm parsing of the max to allow 4GB, and also changes the internal Memory::kMaxValue values to reflect that. We used to use kMaxValue to also represent "no limit", so I split that out into kUnlimitedValue.
* [wasm2js] Fix base64 encoding (#1670)Yury Delendik2018-09-052-0/+51
| | | The static std::string base64Encode(std::vector<char> &data) { uses signed char in input data. The ((int)data[0]) converts it the signed int, making '\xFF' char into -1. The patch fixes casting.
* [wasm2js] Fix nested selects (#1671)Yury Delendik2018-09-052-0/+62
| | | | In wasmjs, the nested selects are trying to use the same temporary locals. The patch reserves temporaries "at right time" to avoid overriding the values.
* Rename `wasm2asm` to `wasm2js`, emit ESM by default (#1642)Alex Crichton2018-08-3069-0/+119538
* Rename the `wasm2asm` tool to `wasm2js` This commit performs a relatively simple rename of the `wasm2asm` tool to `wasm2js`. The functionality of the tool doesn't change just yet but it's intended that we'll start generating an ES module instead of just an `asm.js` function soon. * wasm2js: Support `*.wasm` input files Previously `wasm2js` only supported `*.wast` files but to make it a bit easier to use in tooling pipelines this commit adds support for reading in a `*.wasm` file directly. Determining which parser to use depends on the input filename, where the binary parser is used with `*.wasm` files and the wast parser is used for all other files. * wasm2js: Emit ESM imports/exports by default This commit alters the default behavior of `wasm2js` to emit an ESM by default, either importing items from the environment or exporting. Items like initialization of memory are also handled here.