binaryen
binaryen copied to clipboard
Optimizer and compiler/toolchain library for WebAssembly
```wat (i32.eq (i32.and (i32.wrap_i64 (local.get $0) ) (i32.const 255) ) (i32.const 4) ) =-> (i64.eq (i64.and (local.get $0) (i64.const 255) ) (i64.const 4) ) ``` All the operations work fine...
E.g. ```wat (select (local.get $0) (local.get $1) (i32.lt_s (i32.extend8_s (local.get $2) ) (i32.const 0) ) ) =-> (select (local.get $0) (local.get $1) (i32.and (local.get $2) (i32.const 128) ) ) ```...
E.g. ```wat (i64.eqz (i64.extend_i32_u (i64.eqz (local.get $0) ) ) ) =-> (i64.ne (local.get $0) (i64.const 0) ) ``` Comparing to zero is the same with or without extending: if was...
As far as I can determine, binaryen always fails to open files that contain non-ascii (or perhaps non-latin-1 or some other windowsy encoding) in their path on windows. This is...
I have a `.wasm` file that crashes `wasmtime run -g`, supposedly because of the included dwarf sections. When trying to run `wasm-reduce` to get a smaller repro, the roundtrip test...
Github Actions already provide built-in mechanics for this: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
Pass RemoveUnusedModuleElements does not have multi-memories support. This adds an assert to ensure the pass is not run if the module has multiple memories.
The current source of Asyncify is here, but I think the only docs for it are still in Emscripten. This is a little confusing to say look at another org...
Example: ```cpp if (x == 5) { return x + 1; } else { return x - 1; } if (y == true) { // maxBits(y) true } else {...
After #4811 and #4940 If not specify recently introduced `memoryName` (just use `nullptr`) parameter for `BinaryenLoad`, `BinaryenStore`, `BinaryenMemoryFill` etc., this lead to crash with assertion inside `emscripten-optimizer/istring.h` (line 65): ```...