| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Emit valid wasm binaries even for corner cases of unreachable code.
* emit an unreachable after a node that pushes a value that has unreachable type (where wasm type checking would have pushed a concrete type)
* conversely, as a hack, emulate the wasm polymorphic stack mode by not emptying the stack when it has one element and that element is unreachable. this lets further pops work (all returning an unreachable element)
|
|
|
|
| |
comma, it can't be a coersion (or that would have been the parent), so there is no coercion, so the result type is none (#1115)
|
|\
| |
| | |
Fuzz fixes
|
| |
| |
| |
| | |
to consider type changes for its parent (changing it from a forced i32 to an unreachable might mean the parent needs to become unreachable too)
|
| | |
|
|/ |
|
|
|
|
|
|
| |
* Teach EffectAnalyzer not to reorder atomics wrt other memory operations.
* Teach EffectAnalyzer not to reorder host operations with memory operations
* Teach various passes about the operands of AtomicRMW and AtomicCmpxchg
* Factor out some functions in DeadCodeElimination and MergeBlocks
|
| |
|
|\
| |
| | |
Yet more fuzz fixes
|
| | |
|
| |
| |
| |
| | |
when removed
|
| |
| |
| |
| | |
to. since that's a fairly specific functionality needed in removeUnusedBrs, move it to there
|
|\|
| |
| | |
More fuzz fixes
|
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
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.
|
|\
| |
| | |
Fuzz fixes
|
| | |
|
| |
| |
| |
| | |
need the value, as it may do things
|
| |
| |
| |
| | |
preserve it
|
| |
| |
| |
| | |
may be unreachable
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
to make this practical
|
| | |
|
| |
| |
| |
| | |
that anyhow, let it do it's thing
|
|/
|
|
|
|
| |
* add docs and error hints when a Call should be a CallImport
* fix binaryen API docs in docs/
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
* stackAlloc should align properly; update tests
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It was using wasm-shell instead of wasm-opt to print. This was
emitting an error and empty output. Also this means that the min.wast
test input didn't get updated along with the spec, so I fixed that as well.
|
|
|
|
|
|
| |
* consistently handle possible traps in asm.js ffi results
* consistently handle possible traps in i64/float conversions
|
|
|
|
|
| |
(#1063)
This reverts commit 722e6a1893b7d662e536da206835821b2096c0ee.
|
|
|
|
|
| |
The two new failures are calling aboirt(). They date back to before
the LKGR build: https://wasm-stat.us/builders/linux/builds/20068
So its hard to say when they started failing.
|
| |
|
|
|
|
|
|
| |
* add C API and binaryen.js support for parsing s-expressions
* update js builds and tests
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
Support both syntax formats in input since the old spec
tests still need to be parsable.
|