Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Fix wasm::read_file() to read correctly sized input strings in text mode. ↵ | juj | 2017-07-18 | 1 | -0/+6 | |
| | | | | | | | | (#1088) | |||||
* | | Merge pull request #1095 from WebAssembly/fuzz-3 | Alon Zakai | 2017-07-18 | 9 | -23/+87 | |
|\| | | | | | More fuzz fixes | |||||
| * | fix merge-blocks logic in call, call_indirect, select, we need to avoid any ↵ | Alon Zakai (kripken) | 2017-07-14 | 2 | -7/+21 | |
| | | | | | | | | danger of moving something past a side effect ; also fix an asm2wasm bug with call_indirect fixups; the call target may be a block, which we need to look through | |||||
| * | handle an unreachable block with a reachable final element in merge-blocks | Alon Zakai (kripken) | 2017-07-14 | 1 | -0/+9 | |
| | | ||||||
| * | when removing an if-copy in coalesce-locals, if it's a tee, we do still need ↵ | Alon Zakai (kripken) | 2017-07-13 | 1 | -1/+3 | |
| | | | | | | | | the get in that arm. only when it is not a tee can we remove that arm and make the if-else into an if | |||||
| * | fix validation of memBytes, if the load type is unreachable, we can't and ↵ | Alon Zakai (kripken) | 2017-07-13 | 2 | -3/+6 | |
| | | | | | | | | shouldn't try to validate | |||||
| * | note changes when removing an if body in vacuum | Alon Zakai (kripken) | 2017-07-13 | 1 | -0/+4 | |
| | | ||||||
| * | optimize shifts of 0 | Alon Zakai | 2017-07-13 | 1 | -0/+6 | |
| | | ||||||
| * | zero shifts are not sign-extends | Alon Zakai | 2017-07-13 | 1 | -10/+14 | |
| | | ||||||
| * | handle an unreachable condition properly in vacuum if simplification | Alon Zakai (kripken) | 2017-07-13 | 1 | -0/+6 | |
| | | ||||||
| * | fix handling of an if in a tee without an else, in coalesce-locals | Alon Zakai (kripken) | 2017-07-13 | 1 | -1/+3 | |
| | | ||||||
| * | infinite loops have side effects | Alon Zakai (kripken) | 2017-07-13 | 1 | -1/+15 | |
| | | ||||||
* | | Fix wrong name in --help output (#1099) | Alan Mimms | 2017-07-17 | 1 | -1/+1 | |
| | | ||||||
* | | Validation for AtomicRMW and cmpxchg (#1092) | Derek Schuff | 2017-07-14 | 2 | -10/+37 | |
|/ | | | | Also fix cases where fail() had the arguments backwards. Wasn't an error because lol templates. Also fix printModuleComponent template to SFINAE on Expression* so we properly get the specialized version. | |||||
* | Merge pull request #1087 from WebAssembly/fuzz-2 | Alon Zakai | 2017-07-12 | 23 | -293/+405 | |
|\ | | | | | Fuzz fixes | |||||
| * | fix handling of unreachable br values in merge-blocks | Alon Zakai (kripken) | 2017-07-11 | 1 | -1/+7 | |
| | | ||||||
| * | fix coalesce-locals handling of set/tee local of an unreachable; we still ↵ | Alon Zakai (kripken) | 2017-07-11 | 1 | -2/+6 | |
| | | | | | | | | need the value, as it may do things | |||||
| * | fix block removal in remove-unused-brs, even if not taken, if named, we must ↵ | Alon Zakai (kripken) | 2017-07-11 | 1 | -2/+2 | |
| | | | | | | | | preserve it | |||||
| * | changing a set to a tee or vice versa needs to take into account the value ↵ | Alon Zakai (kripken) | 2017-07-11 | 2 | -1/+2 | |
| | | | | | | | | may be unreachable | |||||
| * | handle unary and binary nodes that have implicit traps in vacuum | Alon Zakai (kripken) | 2017-07-11 | 1 | -1/+12 | |
| | | ||||||
| * | fix Const finalization and use it properly in br finalization in Precompute | Alon Zakai (kripken) | 2017-07-11 | 3 | -1/+10 | |
| | | ||||||
| * | loads may trap, do not remove them in vacuum unless the pass options allow that | Alon Zakai (kripken) | 2017-07-11 | 1 | -1/+3 | |
| | | ||||||
| * | properly handle if arm removal in vacuum | Alon Zakai (kripken) | 2017-07-11 | 1 | -0/+4 | |
| | | ||||||
| * | add the option to seek named breaks, not just taken breaks; refactor headers ↵ | Alon Zakai (kripken) | 2017-07-11 | 17 | -268/+324 | |
| | | | | | | | | to make this practical | |||||
| * | refactor and improve break validation. breaks names are unique, so we don't ↵ | Alon Zakai (kripken) | 2017-07-11 | 4 | -18/+33 | |
| | | | | | | | | need a stack, and break targets must exist even if they are not actually taken | |||||
| * | finalize new drops in SimplifyLocals | Alon Zakai (kripken) | 2017-07-11 | 1 | -0/+2 | |
| | | ||||||
| * | don't remove unreachable nodes in vaccuum, it can alter types, and dce does ↵ | Alon Zakai (kripken) | 2017-07-11 | 1 | -0/+2 | |
| | | | | | | | | that anyhow, let it do it's thing | |||||
* | | Refactor validation failure and printing, validate atomic memory (#1090) | Derek Schuff | 2017-07-12 | 2 | -33/+76 | |
| | | ||||||
* | | add docs and error hints when a Call should be a CallImport (#1081) | Alon Zakai | 2017-07-11 | 2 | -1/+9 | |
|/ | | | | | | * add docs and error hints when a Call should be a CallImport * fix binaryen API docs in docs/ | |||||
* | Factor wasm validator into a cpp file (#1086) | Derek Schuff | 2017-07-10 | 3 | -611/+675 | |
| | | | Also small cleanup to CMake libraries | |||||
* | Fix visitor stubs in traversal templates #1084 | Derek Schuff | 2017-07-10 | 1 | -34/+34 | |
| | | | Making them valid means that derived implementations need not implement all of them, and can fall back on the ones in the template. | |||||
* | Add IR, parsing, printing, and binary for atomic cmpxchg (#1083) | Derek Schuff | 2017-07-10 | 8 | -14/+155 | |
| | ||||||
* | Add IR, parsing and binary support for AtomicRMW instructions from wasm ↵ | Derek Schuff | 2017-07-06 | 8 | -68/+282 | |
| | | | | | threads proposal (#1082) Also leave a stub (but valid) visitAtomicRMW in the visitor template so that not all visitors need to implement this function yet. | |||||
* | show a clear error on nulls in inline strings in binary format (#1068) | Alon Zakai | 2017-07-05 | 1 | -1/+5 | |
| | | | | * show a clear error on nulls in inline strings (which we don't support, and in general are not seen in practice, but are technically valid wasm) in binary format reading | |||||
* | Unified module loader support in binaryen.js (#1074) | Daniel Wirtz | 2017-07-05 | 2 | -29/+15 | |
| | | | | | | * Unified module loader support in binaryen.js * Recompiled binaryen.js and wasm.js | |||||
* | Use sanitizer runtime to print pretty stack traces on unreachable (#1079) | Derek Schuff | 2017-06-30 | 1 | -0/+3 | |
| | | | For even better debugging support. | |||||
* | Code folding (#1076) | Alon Zakai | 2017-06-28 | 10 | -108/+732 | |
| | | | | | | | | | | | | | | | | Adds a pass that folds code, i.e. merges it when possible. See details in comment in the pass implementation cpp. This is enabled by default in -Os and -Oz. Seems risky to enable anywhere else, as it does add branches - likely predictable ones so maybe no slowdown, but still some risk. Code size numbers: wasm-backend: 196331 + binaryen -Os (before): 182598 + binaryen -Os (with folding): 181943 asm2wasm -Os (before): 172463 asm2wasm -Os (with folding): 168774 So this reduces wasm-backend output by an additional 0.5% than it could before. Mainly this is because the wasm backend already has code folding, whereas on asm2wasm output, where we didn't have folding before, this saves over 2%. The 0.5% improvement on the wasm backend's output might be because this can fold more types of code than LLVM can (it can fold nested control flow, in particular). | |||||
* | Add atomic loads and stores (#1077) | Derek Schuff | 2017-06-28 | 11 | -86/+224 | |
| | | | | | Add IR, wast and binary support for atomic loads and stores. Currently all IR generated by means other than parsing wast and binary files always generates non-atomic accesses, and optimizations have not yet been made aware of atomics, so they are certainly not ready to be used yet. | |||||
* | Runtime.stackAlloc should grow down for wasm (#1073) | jgravelle-google | 2017-06-28 | 1 | -8/+4 | |
| | | | | | | * Runtime.stackAlloc should grow down for wasm * stackAlloc should align properly; update tests | |||||
* | Add shared memories (#1069) | Derek Schuff | 2017-06-27 | 6 | -29/+57 | |
| | | | | | Begin to implement wasm threading proposal in https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md This PR just has shared memory attribute with wast and binary support. | |||||
* | Consistently handle possible traps in all cases (#1062) | Alon Zakai | 2017-06-22 | 3 | -11/+81 | |
| | | | | | | * consistently handle possible traps in asm.js ffi results * consistently handle possible traps in i64/float conversions | |||||
* | Change char to auto to avoid type-limits warn on some arches (#1066) | Jakub Jirutka | 2017-06-22 | 1 | -1/+1 | |
| | | | Fixes #1059 | |||||
* | Untee pass (#1053) | Alon Zakai | 2017-06-14 | 4 | -3/+66 | |
| | ||||||
* | S-expression parsing in C API and binaryen.js (#1050) | Alon Zakai | 2017-06-13 | 3 | -0/+29 | |
| | | | | | | * add C API and binaryen.js support for parsing s-expressions * update js builds and tests | |||||
* | SSA pass (#1049) | Alon Zakai | 2017-06-13 | 13 | -29/+698 | |
| | | | | | | | * Add SSA pass which ensures a single assign for each local, except for merged locals where we ensure exactly a single assign from one of the paths leading to that use * Also add InstrumentLocals pass, useful for debugging locals (similar to InstrumentMemory but for locals) * Fix a PickLoadSigns bug with tees not being ignored, which was not noticed until now because we ran it on flatter output by default, but the ssa pass uncovered the bug | |||||
* | fix interpreted code from wasm.js (#1043) | Alon Zakai | 2017-06-12 | 1 | -2/+2 | |
| | | | | | | * fix interpreted code from wasm.js, when the result is none, we must return an empty Literal (the interpreter now asserts on this, it didn't before) * update js builds | |||||
* | Support new result syntax for if/loop/block (#1047) | Sam Clegg | 2017-06-12 | 7 | -25/+37 | |
| | | | | | | Support both syntax formats in input since the old spec tests still need to be parsable. | |||||
* | Optimize/merge duplicate function types (#1041) | Alon Zakai | 2017-06-12 | 1 | -1/+66 | |
| | ||||||
* | Log callImport fatal error to cerr so it is not buffered. (#1036) | Sam Clegg | 2017-06-12 | 3 | -3/+13 | |
| | | | | | | | Use Fatal() rather than stdout or report callImport error Without this the write to stdout can be lost (Since the following line aborts) | |||||
* | Output inf/-inf rather than infinity/-infinity | Sam Clegg | 2017-06-09 | 1 | -1/+1 | |
| | | | | | wast2wasm wes recently updated to only support the former: https://github.com/WebAssembly/wabt/pull/482 |