diff options
author | Thomas Lively <tlively@google.com> | 2023-12-12 18:50:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 18:50:44 -0800 |
commit | 8e9199274e4dbd93b1ca65d9c053c4610599e69f (patch) | |
tree | 48927ac72d6ada4ca61dc0bad9a0db3378746394 /src/parser/parsers.h | |
parent | 28bea549061d88a8a7f7d05f3acf3bca175f0102 (diff) | |
download | binaryen-8e9199274e4dbd93b1ca65d9c053c4610599e69f.tar.gz binaryen-8e9199274e4dbd93b1ca65d9c053c4610599e69f.tar.bz2 binaryen-8e9199274e4dbd93b1ca65d9c053c4610599e69f.zip |
[Parser] Parse rethrow (#6155)
Like `delegate`, rethrow takes a `Try` label. Refactor the delegate handling so
that `Try` can share its logic.
Diffstat (limited to 'src/parser/parsers.h')
-rw-r--r-- | src/parser/parsers.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser/parsers.h b/src/parser/parsers.h index 67bd8bddd..be8db49a9 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -1480,7 +1480,9 @@ template<typename Ctx> Result<> makeThrow(Ctx& ctx, Index pos) { } template<typename Ctx> Result<> makeRethrow(Ctx& ctx, Index pos) { - return ctx.in.err("unimplemented instruction"); + auto label = labelidx(ctx); + CHECK_ERR(label); + return ctx.makeRethrow(pos, *label); } template<typename Ctx> Result<> makeTupleMake(Ctx& ctx, Index pos) { |