diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index 56dfa1ff2..3a44556d5 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1525,6 +1525,9 @@ public: HeapType intendedType; void finalize(); + + // TODO: Support ref.test null as well. + Type getCastType() { return Type(intendedType, NonNullable); } }; class RefCast : public SpecificExpression<Expression::RefCastId> { @@ -1533,14 +1536,14 @@ public: Expression* ref; - HeapType intendedType; - // Support the unsafe `ref.cast_nop_static` to enable precise cast overhead // measurements. enum Safety { Safe, Unsafe }; Safety safety = Safe; void finalize(); + + Type getCastType() { return type; } }; class BrOn : public SpecificExpression<Expression::BrOnId> { @@ -1555,6 +1558,9 @@ public: void finalize(); + // TODO: Support br_on_cast* null as well. + Type getCastType() { return Type(intendedType, NonNullable); } + // Returns the type sent on the branch, if it is taken. Type getSentType(); }; |