summaryrefslogtreecommitdiff
path: root/src/generate-names.cc
diff options
context:
space:
mode:
authorSoni L. <EnderMoneyMod@gmail.com>2024-11-20 14:51:48 -0300
committerGitHub <noreply@github.com>2024-11-20 09:51:48 -0800
commita0b7abef00b59eeafed58c774195189425d020b0 (patch)
tree6f7b0747d3a3ef435bda9ac14ca22d417877796b /src/generate-names.cc
parent958d0a72030227bf3133c8b99c7c670bcdbc7636 (diff)
downloadwabt-a0b7abef00b59eeafed58c774195189425d020b0.tar.gz
wabt-a0b7abef00b59eeafed58c774195189425d020b0.tar.bz2
wabt-a0b7abef00b59eeafed58c774195189425d020b0.zip
binary/wat: Implement EHv4 (#2470)
This pull request implements EHv4. Binary is mostly untested until interp is working.
Diffstat (limited to 'src/generate-names.cc')
-rw-r--r--src/generate-names.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/generate-names.cc b/src/generate-names.cc
index ec3612d7..d029db84 100644
--- a/src/generate-names.cc
+++ b/src/generate-names.cc
@@ -38,6 +38,7 @@ class NameGenerator : public ExprVisitor::DelegateNop {
// Implementation of ExprVisitor::DelegateNop.
Result BeginBlockExpr(BlockExpr* expr) override;
Result BeginTryExpr(TryExpr* expr) override;
+ Result BeginTryTableExpr(TryTableExpr* expr) override;
Result BeginLoopExpr(LoopExpr* expr) override;
Result BeginIfExpr(IfExpr* expr) override;
@@ -218,6 +219,11 @@ Result NameGenerator::BeginTryExpr(TryExpr* expr) {
return Result::Ok;
}
+Result NameGenerator::BeginTryTableExpr(TryTableExpr* expr) {
+ MaybeGenerateName("T", label_count_++, &expr->block.label);
+ return Result::Ok;
+}
+
Result NameGenerator::BeginLoopExpr(LoopExpr* expr) {
MaybeGenerateName("L", label_count_++, &expr->block.label);
return Result::Ok;