summaryrefslogtreecommitdiff
path: root/src/ir/utils.h
diff options
context:
space:
mode:
authorAbbas Mashayekh <martianboy2005@gmail.com>2021-03-06 03:08:51 +0330
committerGitHub <noreply@github.com>2021-03-05 15:38:51 -0800
commit89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4 (patch)
tree602bd8e24753b5e45c859a2c3672062ce07133fe /src/ir/utils.h
parent57619b508d38677844cb482a4034dc985d2cecc6 (diff)
downloadbinaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.tar.gz
binaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.tar.bz2
binaryen-89b8af006bc56cb4bf68f12a80b1cfe8e7a353d4.zip
[reference-types] Support passive elem segments (#3572)
Passive element segments do not belong to any table, so the link between Table and elem needs to be weaker; i.e. an elem may have a table in case of active segments, or simply be a collection of function references in case of passive/declarative segments. This PR takes Table::Segment out and turns it into a first class module element just like tables and functions. It also implements early support for parsing, printing, encoding and decoding passive/declarative elem segments.
Diffstat (limited to 'src/ir/utils.h')
-rw-r--r--src/ir/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ir/utils.h b/src/ir/utils.h
index 424298bb3..f06a68fff 100644
--- a/src/ir/utils.h
+++ b/src/ir/utils.h
@@ -121,6 +121,7 @@ struct ReFinalize
void visitExport(Export* curr);
void visitGlobal(Global* curr);
void visitTable(Table* curr);
+ void visitElementSegment(ElementSegment* curr);
void visitMemory(Memory* curr);
void visitEvent(Event* curr);
void visitModule(Module* curr);
@@ -144,6 +145,7 @@ struct ReFinalizeNode : public OverriddenVisitor<ReFinalizeNode> {
void visitExport(Export* curr) { WASM_UNREACHABLE("unimp"); }
void visitGlobal(Global* curr) { WASM_UNREACHABLE("unimp"); }
void visitTable(Table* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitElementSegment(ElementSegment* curr) { WASM_UNREACHABLE("unimp"); }
void visitMemory(Memory* curr) { WASM_UNREACHABLE("unimp"); }
void visitEvent(Event* curr) { WASM_UNREACHABLE("unimp"); }
void visitModule(Module* curr) { WASM_UNREACHABLE("unimp"); }