summaryrefslogtreecommitdiff
path: root/src/parser/context-decls.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename indexType -> addressType. NFC (#7060)Sam Clegg2024-11-071-3/+3
| | | See https://github.com/WebAssembly/memory64/pull/92
* Make source parser consistent with binary parser when naming things. NFC (#6813)Sam Clegg2024-08-061-2/+3
| | | | | The `timport$` prefix is already used for tables, so the binary parser currently uses `eimport$` to name tags (I guess because they are normally exception tags?).
* [memory64] Add table64 to existing memory64 support (#6577)Sam Clegg2024-05-101-6/+7
| | | | | | | Tests is still very limited. Hopefully we can use the upstream spec tests soon and avoid having to write our own tests for `.set/.set/.fill/etc`. See https://github.com/WebAssembly/memory64/issues/51
* [Parser] Support prologue and epilogue sourcemap annotations (#6370)Thomas Lively2024-03-041-7/+15
| | | | | | | and fix a bug with sourcemap annotations on folded `if` conditions. Update IRBuilder to apply prologue and epilogue source locations when beginning and ending a function scope. Add basic support in the parser for explicitly tracking annotations on module fields, although only do anything with them in the case of prologue source location annotations.
* [Parser][NFC] Remove parser/input.h (#6332)Thomas Lively2024-02-221-1/+1
| | | | Remove the layer of abstraction sitting between the parser and the lexer now that the lexer has an interface the parser can use directly.
* [Parser] Parse tables and element segments (#6147)Thomas Lively2023-12-061-1/+74
| | | | | | | These module fields are especially complex to parse because they contain both nontrivial types and instructions, so their parsing logic needs to be spread out across the ParseDecls, ParseModuleTypes, and ParseDefs phases of parsing. This applies to in-line elements in table definitions as well, which means we need to be able to match a table to its in-line element segment across multiple phases.
* [Parser] Parse tags and throw (#6126)Thomas Lively2023-11-201-9/+35
| | | | Also fix the parser to correctly error if an imported item appears after a non-imported item and make the corresponding fix to the test.
* [NFC][Parser] Simplify instruction handling (#5964)Thomas Lively2023-09-211-1/+0
| | | | | | | | | | | The new wat parser previously returned InstrT types when parsing individual instructions and collected InstrsT types when parsing sequences of instructions. However, instructions were always actually tracked in the internal state of the parsing context, so these types never held any interesting or necessary data. Simplify the parser by removing these types and leaning into the pattern that the parser context will keep track of parsed instructions. This allows for a much cleaner separation between the `instrs` and `foldedinstrs` parser functions.
* [NFC] Split the new wat parser into multiple files (#5960)Thomas Lively2023-09-191-0/+194
And put the new files in a new source directory, "parser". This is a rough split and is not yet expected to dramatically improve compile times. The exact organization of the new files is subject to change, but this splitting should be enough to make further parser development more pleasant.