| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* if a block has a concrete final element (or a break with a value), then even if it has an unreachable child, keep it with that concrete type. this means we no longe allow the silly case of a block with an unreachable in the middle and a concrete as the final element while the block is unreachable - after this change, the block would have the type of the final element
* if an if has a concrete element in one arm, make it have that type as a result, even if the if condition is unreachable, to parallel block
* make type rules for brs and switches simpler, ignore whether they are reachable or not. whether they are dead code should not affect how they influence other types in our IR.
|
|
|
| |
Reduce an interesting wasm to a smaller still interesting wasm. This takes an arbitrary command to run, and reduces the wasm as much as it can while keeping the behavior of that command fixed. This can be used to reduce compiler bugs in an arbitrary VM, etc.
|
| |
|
|
|
| |
According to spec at https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#wait-and-wake-operators
|
|
|
|
| |
* Added BinaryenModulePrintAsmjs (using wasm2asm) + Module#emitAsmjs JS binding
|
|
|
| |
Ignoring unreachable code in wasm binaries lets us avoid corner cases with unstructured code in wasm binaries that is a poor fit for Binaryen's structured IR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Translate assert_return invokes to asm
* Translate assert_trap tests to JS
* Enable wasm2asm tests
* Fix wasm2asm translation of store
* Update ubuntu nodejs in Travis
* Free JSPrinter buffer
* Use unique_ptr for Functions to prevent leaks
* Add tests for assert translation
|
|
|
|
| |
* emit optimal-size LEBs in section/subsection/function body sizes, instead of preallocating 5 bytes
|
|
|
|
| |
unreachable
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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)
|
| | |
|
|/
|
|
| |
unreachable stacky code which may introduce concrete elements in non-final block positoins
|
| |
|
|
|
|
| |
type is unreachable (#1102)
|
|\
| |
| | |
More fuzz fixes
|
| |
| |
| |
| | |
shouldn't try to validate
|
|/
|
|
| |
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
|
| |
| |
| |
| | |
may be unreachable
|
| | |
|
| |
| |
| |
| | |
to make this practical
|
| |
| |
| |
| | |
need a stack, and break targets must exist even if they are not actually taken
|
| | |
|
|/
|
|
|
|
| |
* add docs and error hints when a Call should be a CallImport
* fix binaryen API docs in docs/
|
|
|
| |
Also small cleanup to CMake libraries
|
| |
|
|
|
|
|
| |
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 (which we don't support, and in general are not seen in practice, but are technically valid wasm) in binary format reading
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
| |
Fixes #1059
|
|
|
|
|
|
| |
Support both syntax formats in input since the old spec
tests still need to be parsable.
|
|
|
|
|
| |
wast2wasm wes recently updated to only support the
former: https://github.com/WebAssembly/wabt/pull/482
|
|
|
| |
This PR adds global variable support (addGlobal, getGlobal, setGlobal), host operations (currentMemory, growMemory), a few utility functions (removeImport, removeExport, getFunctionTypeBySignature with the latter being scheduled for removal once a better alternative is in place) and it introduces an additional argument to specify the result type in BinaryenBlock (effectively breaking the C-API but retaining previous behaviour by introducing the BinaryenUndefined() type for this purpose). Additionally, it enables compilation with exception support in build-js.sh as exceptions are thrown and caught when optimizing endless loops, intentionally resulting in an unreachable opcode. Affected test cases have been updated accordingly.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|