| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
* Unified module loader support in binaryen.js
* Recompiled binaryen.js and wasm.js
|
|
|
| |
For even better debugging support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* consistently handle possible traps in asm.js ffi results
* consistently handle possible traps in i64/float conversions
|
|
|
| |
Fixes #1059
|
| |
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
* 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 both syntax formats in input since the old spec
tests still need to be parsable.
|
| |
|
|
|
|
|
|
|
| |
Use Fatal() rather than stdout or report callImport error
Without this the write to stdout can be lost (Since the following line
aborts)
|
|
|
|
|
| |
wast2wasm wes recently updated to only support the
former: https://github.com/WebAssembly/wabt/pull/482
|
|
|
|
|
|
| |
* fix mutex usage in C API, and some minor cleanup around it too
* update testcase that was forgotten to be updated before
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generate stackSave function in s2wasm
* Generate stackAlloc in s2wasm
* Generate stackRestore in s2wasm
* Update dot_s tests for runtime functions
* Add s2wasm check for exporting runtime functions
* Fix flake8 for s2wasm.py
* Rename wasmBuilder to builder
|
|
|
|
| |
should still not have returns with a value, etc. update spec tests to remove some stacky tests that do not fit these new validation rules (#1034)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
error may be in a global init
|
|
|
|
|
|
|
|
| |
(#1017)
* Extends wasm-as, wasm-dis and s2wasm to consume debug locations.
* Exports source map from asm2wasm
|
|
|
|
| |
* refactor optimization opts helper code to a class
|
|
|
|
|
|
| |
* validate that memory/table segment values fit in the initial range
* validate that select condition should be i32
|
|
|
|
| |
before and after optimizations are run, checking for changes. this can be used when fuzzing
|
| |
|
| |
|