summaryrefslogtreecommitdiff
path: root/test/wasm2js/br_table_to_loop.2asm.js
Commit message (Collapse)AuthorAgeFilesLines
* Stop emitting "almost asm" in wasm2js output (#2221)Alon Zakai2019-07-121-1/+0
| | | We don't ever emit "use asm" anymore, so this similar annotation is not really useful, it just increases size.
* wasm2js: Switch optimizations (#2141)Alon Zakai2019-05-281-14/+10
| | | | | 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.
* wasm2js: optimize away unneeded load coercions (#2107)Alon Zakai2019-05-151-0/+1
|
* wasm2js: optimize loads (#2085)Alon Zakai2019-05-031-1/+0
| | | | When loading a boolean, prefer the signed heap (which is more commonly used, and may be faster). We never use HEAPU32 (HEAP32 is always enough), just remove it.
* wasm2js: run full optimizations during the pipeline (#2071)Alon Zakai2019-04-301-2/+2
| | | | | We flatten for the i64 lowering etc. passes, and it is worth optimizing afterwards, to clean up stuff they created. That is run if the user ran wasm2js with an optimization level (like wasm2js -O3). Split the test files to check both optimized and unoptimized code.
* wasm2js: optimize switches (#2067)Alon Zakai2019-04-301-4/+0
| | | | | | | | | | Don't emit unneeded breaks in switch cases, instead do case X: case Y: .. case W: break .. for each group. Also, the group with the default doesn't need any cases but the default itself.
* wasm2js: remove unneeded break/continue labels (#2058)Alon Zakai2019-04-261-3/+3
|
* wasm2js: optimize loops and eqz (#2051)Alon Zakai2019-04-251-6/+4
|
* wasm2js: emit quoted properties for the exports, to support closure compiler ↵Alon Zakai2019-04-231-2/+2
| | | | (#2043)
* wasm2js: avoid non-ES5 stuff like "let" (#2041)Alon Zakai2019-04-231-4/+4
| | | Also fix the fuzzer's handling of feature flags so that wasm2js can work.
* wasm2js2 import fixes (#2031)Alon Zakai2019-04-191-1/+0
| | | | | | * Don't assume function types exist in legalize-js-interface. * Properly handle (ignore) imports in RemoveNonJSOps - do not try to recurse into them. * Run legalize-js-interface and remove-unused-module-elements in wasm2js, the first is necessary, the last is nice to have.
* wasm2js: remove "use asm", we are not asm.js anymore (#2020)Alon Zakai2019-04-181-1/+1
| | | Also emit the memory growth code based on memory growth, and not whether we are "use asm" or not.
* wasm2js: fix br_table to loop (#2018)Alon Zakai2019-04-171-0/+67