summaryrefslogtreecommitdiff
path: root/src/parser/parsers.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-11-09 23:24:09 +0100
committerGitHub <noreply@github.com>2023-11-09 14:24:09 -0800
commitb289577d596bc23e9285e12661e96149a29edb6c (patch)
treed89d1dd7114055c8b0910861d03b4abf2f5e2242 /src/parser/parsers.h
parentb8422c5c964fdbb1d4cb01181de121c30c0a2f70 (diff)
downloadbinaryen-b289577d596bc23e9285e12661e96149a29edb6c.tar.gz
binaryen-b289577d596bc23e9285e12661e96149a29edb6c.tar.bz2
binaryen-b289577d596bc23e9285e12661e96149a29edb6c.zip
[Parser][NFC] Filter out unused instructions in gen-s-parser.py (#6095)
The new wat parser parses block, if, loop, then, and else keywords directly rather than depending on code generated from gen-s-parser.py. Filter these keywords out in gen-s-parser.py when generating the new wat parser and delete the stub functions that the removed generated code used to depend on.
Diffstat (limited to 'src/parser/parsers.h')
-rw-r--r--src/parser/parsers.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/parser/parsers.h b/src/parser/parsers.h
index 7ac25def4..44c4f959e 100644
--- a/src/parser/parsers.h
+++ b/src/parser/parsers.h
@@ -69,8 +69,6 @@ template<typename Ctx> Result<> makeLocalTee(Ctx&, Index);
template<typename Ctx> Result<> makeLocalSet(Ctx&, Index);
template<typename Ctx> Result<> makeGlobalGet(Ctx&, Index);
template<typename Ctx> Result<> makeGlobalSet(Ctx&, Index);
-template<typename Ctx> Result<> makeBlock(Ctx&, Index);
-template<typename Ctx> Result<> makeThenOrElse(Ctx&, Index);
template<typename Ctx> Result<> makeConst(Ctx&, Index, Type type);
template<typename Ctx>
Result<>
@@ -100,10 +98,6 @@ template<typename Ctx> Result<> makeDataDrop(Ctx&, Index);
template<typename Ctx> Result<> makeMemoryCopy(Ctx&, Index);
template<typename Ctx> Result<> makeMemoryFill(Ctx&, Index);
template<typename Ctx> Result<> makePop(Ctx&, Index);
-template<typename Ctx> Result<> makeIf(Ctx&, Index);
-template<typename Ctx>
-Result<> makeMaybeBlock(Ctx&, Index, size_t i, Type type);
-template<typename Ctx> Result<> makeLoop(Ctx&, Index);
template<typename Ctx> Result<> makeCall(Ctx&, Index, bool isReturn);
template<typename Ctx> Result<> makeCallIndirect(Ctx&, Index, bool isReturn);
template<typename Ctx> Result<> makeBreak(Ctx&, Index);
@@ -967,10 +961,6 @@ template<typename Ctx> Result<> makeGlobalSet(Ctx& ctx, Index pos) {
return ctx.makeGlobalSet(pos, *global);
}
-template<typename Ctx> Result<> makeBlock(Ctx& ctx, Index pos) {
- return ctx.in.err("unimplemented instruction");
-}
-
template<typename Ctx> Result<> makeConst(Ctx& ctx, Index pos, Type type) {
assert(type.isBasic());
switch (type.getBasic()) {
@@ -1192,19 +1182,6 @@ template<typename Ctx> Result<> makePop(Ctx& ctx, Index pos) {
return ctx.in.err("unimplemented instruction");
}
-template<typename Ctx> Result<> makeIf(Ctx& ctx, Index pos) {
- return ctx.in.err("unimplemented instruction");
-}
-
-template<typename Ctx>
-Result<> makeMaybeBlock(Ctx& ctx, Index pos, size_t i, Type type) {
- return ctx.in.err("unimplemented instruction");
-}
-
-template<typename Ctx> Result<> makeLoop(Ctx& ctx, Index pos) {
- return ctx.in.err("unimplemented instruction");
-}
-
template<typename Ctx> Result<> makeCall(Ctx& ctx, Index pos, bool isReturn) {
auto func = funcidx(ctx);
CHECK_ERR(func);