summaryrefslogtreecommitdiff
path: root/test/lit/binary
Commit message (Collapse)AuthorAgeFilesLines
* Parse and emit `array.len` without a type annotation (#5151)Thomas Lively2022-10-182-0/+18
| | | Test that we can still parse the old annotated form as well.
* Fix binary parsing of the prototype nominal format (#4679)Thomas Lively2022-05-191-13/+13
| | | | | | We were checking that nominal modules only had a single element in their type sections, but that's not correct for the prototype nominal binary format we still want to support. The test for this missed catching the bug because it wasn't actually parsing in nominal mode.
* Parse the prototype nominal binary format (#4644)Thomas Lively2022-05-042-0/+27
| | | | | | In f124a11ca3 we removed support for the prototype nominal binary format entirely, but that means that we can no longer parse older binary modules that used that format. Fix this regression by restoring the ability to parse the prototype binary format.
* [Wasm GC] Fix stacky non-nullable tuples (#4561)Alon Zakai2022-03-312-0/+112
| | | | | #4555 fixed validation for such tuples, but we also did not handle them in "stacky" code using pops etc., due to a logic bug in the binary reading code.
* Warn about and ignore empty local/param names in name section (#4426)Alon Zakai2022-01-072-0/+14
| | | | | | | Fixes the crash in #4418 Also replace the .at() there with better logic to handle imported functions. See WebAssembly/wabt#1799 for details on why wabt sometimes emits this.
* [GC] Move heap-types.wast out of lit/test/binary/ (#4424)Heejin Ahn2022-01-041-150/+0
| | | Apparently it is not a binary test?
* [EH] Fixup nested pops after reading stacky binary (#4420)Heejin Ahn2022-01-042-0/+66
| | | | | | When reading stacky code in the binary reader, we create `block`s to make it fit into Binaryen AST, within which `pop`s can be nested, making the resulting AST invalid. This PR runs the fixup function after reading each `Try` to fix this.
* Add binary format parse checking for ref.as input type (#4389)Alon Zakai2021-12-162-0/+6
| | | | | | | If that type is not valid then we cannot even create and finalize the node, which means we'd hit an assertion inside finalize(), before we reach the validator. Fixes #4383
* Print heap types in text format in nominal mode (#4316)Alon Zakai2021-11-081-5/+5
| | | | | | | Without this roundtripping may not work in nominal mode, as we might not assign the expected heap types in the right places. Specifically, when the signature matches but the nominal types are distinct then we need to keep them that way (and the sugar in the text format parsing will merge them).
* Switch from "extends" to M4 nominal syntax (#4248)Thomas Lively2021-10-141-7/+7
| | | | | | | | Switch from "extends" to M4 nominal syntax Change all test inputs from using the old (extends $super) syntax to using the new *_subtype syntax for their inputs and also update the printer to emit the new syntax. Add a new test explicitly testing the old notation to make sure it keeps working until we remove support for it.
* [Wasm GC] Implement static (rtt-free) StructNew, ArrayNew, ArrayInit (#4172)Alon Zakai2021-09-231-0/+150
| | | | | | | | | See #4149 This modifies the test added in #4163 which used static casts on dynamically-created structs and arrays. That was technically not valid (as we won't want users to "mix" the two forms). This makes that test 100% static, which both fixes the test and gives test coverage to the new instructions added here.
* Support new dylink.0 custom section format (#4141)Sam Clegg2021-09-112-3/+3
| | | | | | | See also: spec change: https://github.com/WebAssembly/tool-conventions/pull/170 llvm change: https://reviews.llvm.org/D109595 wabt change: https://github.com/WebAssembly/wabt/pull/1707 emscripten change: https://github.com/emscripten-core/emscripten/pull/15019
* Handle extra info in dylink section (#4112)Sam Clegg2021-08-312-0/+15
If extra data is found in this section simply propagate it. Also, remove some dead code from wasm-binary.cpp.