binaryen
binaryen copied to clipboard
Optimizer and compiler/toolchain library for WebAssembly
I would like to use tables of non-nullable values but Binaryen does not appear to support them. Relatedly, the binary format parser does not appear to support init value expressions...
Consider test.wat: ``` $ cat /tmp/test.wat (module (func $f (export "f") (result i64) (i64.const 0x8000_0000))) ``` There is a bug parsing the constant: ``` $ ~/src/binaryen/bin/wasm-as -o /tmp/test.wasm /tmp/test.wat $...
As per https://webassembly.github.io/spec/core/text/modules.html#id10, this is a valid wat file: ``` (func $f) ``` However `wasm-as` is more strict: ``` [parse exception: toplevel does not start with module]Fatal: error in parsing...
I was aware of [this](https://github.com/WebAssembly/binaryen/wiki/Compiling-to-WebAssembly-with-Binaryen#what-do-i-need-to-have-in-order-to-use-binaryen-to-compile-to-webassembly) but do we have a formal spec of the text syntax? Or using the binaryen API is the *only* recommended way to use binaryen? Thank...
Fix two issues in --spill-pointers: 1) properly generate the stack frame in a stack-grows-downwards manner, and 2) do not spill pointers in the functions stackAlloc()/stackSave()/stackRestore(), which should operate on the...
One of these passes definitely has nondeterminism: - --intrinsic-lowering - --remove-unused-module-elements Additionally, there is more determinism somewhere in optimization pipelines with these flags: - --partial-inlining-ifs=4 -fimfs=50 --gufa --intrinsic-lowering -O3
The spec tests use an extension of the standard text format that includes various commands and assertions used to test WebAssembly implementations. Add a utility to parse this extended WebAssembly...
This is inconsistent with all other shorthands, but it is the latest behavior in V8. Fix the text and binary shorthands in both parsers and writers.
Heap stores (`struct.set`) are optimized into the `struct.new` when they are adjacent in a statement list. Pushing `struct.new` down when they are not adjacent increases the likelihood for heap stores...