Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [wasm2js] Use native JavaScript Math.trunc (#3329) | Max Graey | 2020-11-10 | 1 | -0/+1 |
| | |||||
* | wasm2js: Remove global dict arguments to asmFunc (#3325) | Sam Clegg | 2020-11-05 | 1 | -26/+13 |
| | |||||
* | Rewrite DCE pass (#3274) | Alon Zakai | 2020-10-26 | 1 | -13/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | | | The DCE pass is one of the oldest in binaryen, and had quite a lot of cruft from the changes in unreachability and other stuff in wasm and binaryen's history. This PR rewrites it from scratch, making it about 1/3 the size. I noticed this when looking for places to use code autogeneration. The old version had annoying boilerplate, while the new one avoids any need for it. There may be noticeable differences, as the old pass did more than it needed to. It overlapped with remove-unused-names for some reason I don't remember. The new pass leaves that to the other pass to do. I added another run of remove-unused-names to avoid noticeable differences in optimized builds, but you can see differences in the testcases that only run DCE by itself. (The test differences in this PR are mostly whitespace.) (The overlap is that if a block ended up not needed, that is, all branches to it were removed, the old DCE would remove the block.) This pass is about 15% faster than the old version. However, when adding another run of remove-unused-names the difference basically vanishes, so this isn't a speedup. | ||||
* | wasm2js: Skip heap creation in the absence of wasm memory. NFC (#3167) | Sam Clegg | 2020-09-24 | 1 | -11/+16 |
| | | | | | Also, format the asmFunc call to make it more readable in the ES6 modules case. | ||||
* | wasm2js: Support exported tables (#3152) | Sam Clegg | 2020-09-21 | 1 | -1/+0 |
| | |||||
* | DCE at the end of wasm2js (#2574) | Alon Zakai | 2020-01-06 | 1 | -15/+13 |
| | | | | | | By doing so we ensure that our calls to convert wasm types to JS types never try to convert an unreachable. Fixes #2558 | ||||
* | wasm2js: Fix switch lowering, don't fall through after the hoisted parts (#2301) | Alon Zakai | 2019-08-16 | 1 | -0/+55 |
The switch lowering will "hoist" blocks of code into the JS switch when it can. If it can hoist some but not others, it must not fall through into those others (while it can fall through the hoisted ones - they began as nested blocks with falling-through between them). To fix this, after the hoisted ones issue a break out of the switch (which now contains all the hoisted code, so breaking out of it gets to the code right after the hoisted ones). fixes #2300 |