diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h index 48adf103b..c4dbd2f3f 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -531,6 +531,9 @@ public: MemoryFillId, PushId, PopId, + RefNullId, + RefIsNullId, + RefFuncId, TryId, ThrowId, RethrowId, @@ -569,6 +572,8 @@ public: const char* getExpressionName(Expression* curr); +Literal getLiteralFromConstExpression(Expression* curr); + typedef ArenaVector<Expression*> ExpressionList; template<Expression::Id SID> class SpecificExpression : public Expression { @@ -1008,6 +1013,7 @@ public: Expression* condition; void finalize(); + void finalize(Type type_); }; class Drop : public SpecificExpression<Expression::DropId> { @@ -1070,6 +1076,32 @@ public: Pop(MixedArena& allocator) {} }; +class RefNull : public SpecificExpression<Expression::RefNullId> { +public: + RefNull() = default; + RefNull(MixedArena& allocator) {} + + void finalize(); +}; + +class RefIsNull : public SpecificExpression<Expression::RefIsNullId> { +public: + RefIsNull(MixedArena& allocator) {} + + Expression* value; + + void finalize(); +}; + +class RefFunc : public SpecificExpression<Expression::RefFuncId> { +public: + RefFunc(MixedArena& allocator) {} + + Name func; + + void finalize(); +}; + class Try : public SpecificExpression<Expression::TryId> { public: Try(MixedArena& allocator) {} |