summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 7fd284756..876a9bfa7 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1306,13 +1306,17 @@ class Try : public SpecificExpression<Expression::TryId> {
public:
Try(MixedArena& allocator) : catchEvents(allocator), catchBodies(allocator) {}
+ Name name; // label that can only be targeted by 'delegate's
Expression* body;
ArenaVector<Name> catchEvents;
ExpressionList catchBodies;
+ Name delegateTarget; // target try's label
bool hasCatchAll() const {
return catchBodies.size() - catchEvents.size() == 1;
}
+ bool isCatch() const { return !catchBodies.empty(); }
+ bool isDelegate() const { return delegateTarget.is(); }
void finalize();
void finalize(Type type_);
};