summaryrefslogtreecommitdiff
path: root/src/parser/contexts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/contexts.h')
-rw-r--r--src/parser/contexts.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parser/contexts.h b/src/parser/contexts.h
index 5acb842d6..7e70b6776 100644
--- a/src/parser/contexts.h
+++ b/src/parser/contexts.h
@@ -674,6 +674,10 @@ struct NullInstrParserCtx {
makeTableCopy(Index, const std::vector<Annotation>&, TableIdxT*, TableIdxT*) {
return Ok{};
}
+ Result<>
+ makeTableInit(Index, const std::vector<Annotation>&, TableIdxT*, ElemIdxT) {
+ return Ok{};
+ }
Result<> makeThrow(Index, const std::vector<Annotation>&, TagIdxT) {
return Ok{};
}
@@ -2325,6 +2329,15 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
return withLoc(pos, irBuilder.makeTableCopy(*dest, *src));
}
+ Result<> makeTableInit(Index pos,
+ const std::vector<Annotation>& annotations,
+ Name* table,
+ Name elem) {
+ auto t = getTable(pos, table);
+ CHECK_ERR(t);
+ return withLoc(pos, irBuilder.makeTableInit(elem, *t));
+ }
+
Result<>
makeThrow(Index pos, const std::vector<Annotation>& annotations, Name tag) {
return withLoc(pos, irBuilder.makeThrow(tag));