summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 8cada039f..255f18a16 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1333,6 +1333,8 @@ public:
Expression* rtt;
void finalize();
+
+ Type getCastType();
};
class RefCast : public SpecificExpression<Expression::RefCastId> {
@@ -1343,13 +1345,24 @@ public:
Expression* rtt;
void finalize();
+
+ Type getCastType();
};
class BrOnCast : public SpecificExpression<Expression::BrOnCastId> {
public:
BrOnCast(MixedArena& allocator) {}
- void finalize() { WASM_UNREACHABLE("TODO (gc): br_on_cast"); }
+ Name name;
+ // The cast type cannot be inferred from rtt if rtt is unreachable, so we must
+ // store it explicitly.
+ Type castType;
+ Expression* ref;
+ Expression* rtt;
+
+ void finalize();
+
+ Type getCastType();
};
class RttCanon : public SpecificExpression<Expression::RttCanonId> {