summaryrefslogtreecommitdiff
path: root/test/polymorphic_stack.wast.fromBinary
Commit message (Collapse)AuthorAgeFilesLines
* Emit imports before defined things in text format (#1715)Alon Zakai2018-11-011-1/+1
| | | | | That is the correct order in the text format, wabt errors otherwise. See AssemblyScript/assemblyscript#310
* Binary format local parsing fixes (#1664)Alon Zakai2018-09-111-6/+6
| | | | | | * Error if there are more locals than browsers allow (50,000). We usually just warn about stuff like this, but we do need some limit (or else we hang or OOM), and if so, why not use the agreed-upon Web limit. * Do not generate nice string names for locals in binary parsing - the name is just $var$x instead of $x, so not much benefit, and worse as our names are interned this is actually slow (which is why the fuzz testcase here hangs instead of OOMing). Testcases and bugreport in #1663.
* Optimize out memory and table when possible (#1352)Alon Zakai2018-01-101-1/+0
| | | We can remove the memory/table (itself, or an import if imported) if they are not used. This is pretty minor on a large wasm file, but when reading small wasts it's very noticeable to have an unused memory and table all the time.
* Emit binary function index in comment in text format, for convenience (#1232)Alon Zakai2017-10-201-9/+9
|
* Avoid new blocks in binary reading/writing (#1165)Alon Zakai2017-09-121-37/+23
| | | | | | * don't emit a toplevel block if we don't need to, as in wasm it is a list context * don't create unnecessary blocks in wasm reading
* Return to more structured type rules for block and if (#1148)Alon Zakai2017-09-051-1/+22
| | | | | | | | * if a block has a concrete final element (or a break with a value), then even if it has an unreachable child, keep it with that concrete type. this means we no longe allow the silly case of a block with an unreachable in the middle and a concrete as the final element while the block is unreachable - after this change, the block would have the type of the final element * if an if has a concrete element in one arm, make it have that type as a result, even if the if condition is unreachable, to parallel block * make type rules for brs and switches simpler, ignore whether they are reachable or not. whether they are dead code should not affect how they influence other types in our IR.
* Ignore unreachable code in wasm binaries (#1122)Alon Zakai2017-08-221-87/+17
| | | Ignoring unreachable code in wasm binaries lets us avoid corner cases with unstructured code in wasm binaries that is a poor fit for Binaryen's structured IR.
* fix proper wasm emitting of untaken br_tablesAlon Zakai2017-08-011-0/+11
|
* Polymophic stack support (#1117)Alon Zakai2017-07-311-0/+129
Emit valid wasm binaries even for corner cases of unreachable code. * emit an unreachable after a node that pushes a value that has unreachable type (where wasm type checking would have pushed a concrete type) * conversely, as a hack, emulate the wasm polymorphic stack mode by not emptying the stack when it has one element and that element is unreachable. this lets further pops work (all returning an unreachable element)