diff options
author | Alon Zakai <azakai@google.com> | 2019-05-28 10:58:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 10:58:14 -0700 |
commit | 4b223a33d9f44b99a783cb63329facea7edfb783 (patch) | |
tree | 05530ae1e9dc98acf18133c05ddfad1ba5826a1c /test/binaryen.js | |
parent | 899263882c48dba8e34717af1e28005f8888dca7 (diff) | |
download | binaryen-4b223a33d9f44b99a783cb63329facea7edfb783.tar.gz binaryen-4b223a33d9f44b99a783cb63329facea7edfb783.tar.bz2 binaryen-4b223a33d9f44b99a783cb63329facea7edfb783.zip |
wasm2js: Switch optimizations (#2141)
This pattern-matches towers of blocks + a br_table into a JS switch. This is much smaller in code size and also avoids heavy nesting that can exceed the recursion limits of JS parsers.
This is not enough yet, because it pattern-matches very specifically. In reality, switches can look slightly different. Followup PRs will extend this. For now, this passes the test suite (what passed before - not including the massive-switch tests) + fuzzing so it's a good start.
Diffstat (limited to 'test/binaryen.js')
0 files changed, 0 insertions, 0 deletions