summaryrefslogtreecommitdiff
path: root/src/resolve-names.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2019-02-13 16:27:24 -0800
committerGitHub <noreply@github.com>2019-02-13 16:27:24 -0800
commit19191efaf1b5b92b0357b303be1b25cf439be9a2 (patch)
tree1bd4be08904c059f809a69fff660de3a3cc5321c /src/resolve-names.cc
parente448ac7cbd74f7a048b1de15ce1a2716340a57c8 (diff)
downloadwabt-19191efaf1b5b92b0357b303be1b25cf439be9a2.tar.gz
wabt-19191efaf1b5b92b0357b303be1b25cf439be9a2.tar.bz2
wabt-19191efaf1b5b92b0357b303be1b25cf439be9a2.zip
Add br_on_exn instruction (#1016)
It takes two u32 immediates: the branch depth and an exception index. The stack signature is `[expect_ref] -> [except_ref]`, so the `except_ref` can be tested easily against multiple exception types.
Diffstat (limited to 'src/resolve-names.cc')
-rw-r--r--src/resolve-names.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resolve-names.cc b/src/resolve-names.cc
index 3ebd3567..f963a0fc 100644
--- a/src/resolve-names.cc
+++ b/src/resolve-names.cc
@@ -40,6 +40,7 @@ class NameResolver : public ExprVisitor::DelegateNop {
Result EndBlockExpr(BlockExpr*) override;
Result OnBrExpr(BrExpr*) override;
Result OnBrIfExpr(BrIfExpr*) override;
+ Result OnBrOnExnExpr(BrOnExnExpr*) override;
Result OnBrTableExpr(BrTableExpr*) override;
Result OnCallExpr(CallExpr*) override;
Result OnCallIndirectExpr(CallIndirectExpr*) override;
@@ -257,6 +258,12 @@ Result NameResolver::OnBrIfExpr(BrIfExpr* expr) {
return Result::Ok;
}
+Result NameResolver::OnBrOnExnExpr(BrOnExnExpr* expr) {
+ ResolveLabelVar(&expr->label_var);
+ ResolveEventVar(&expr->event_var);
+ return Result::Ok;
+}
+
Result NameResolver::OnBrTableExpr(BrTableExpr* expr) {
for (Var& target : expr->targets)
ResolveLabelVar(&target);