diff options
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r-- | src/wasm-builder.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 018b0bf8b..346f2f5ba 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -765,6 +765,13 @@ public: ret->finalize(); return ret; } + RefTest* makeRefTest(Expression* ref, HeapType intendedType) { + auto* ret = wasm.allocator.alloc<RefTest>(); + ret->ref = ref; + ret->intendedType = intendedType; + ret->finalize(); + return ret; + } RefCast* makeRefCast(Expression* ref, Expression* rtt) { auto* ret = wasm.allocator.alloc<RefCast>(); ret->ref = ref; @@ -772,6 +779,13 @@ public: ret->finalize(); return ret; } + RefCast* makeRefCast(Expression* ref, HeapType intendedType) { + auto* ret = wasm.allocator.alloc<RefCast>(); + ret->ref = ref; + ret->intendedType = intendedType; + ret->finalize(); + return ret; + } BrOn* makeBrOn(BrOnOp op, Name name, Expression* ref, Expression* rtt = nullptr) { auto* ret = wasm.allocator.alloc<BrOn>(); @@ -782,6 +796,15 @@ public: ret->finalize(); return ret; } + BrOn* makeBrOn(BrOnOp op, Name name, Expression* ref, HeapType intendedType) { + auto* ret = wasm.allocator.alloc<BrOn>(); + ret->op = op; + ret->name = name; + ret->ref = ref; + ret->intendedType = intendedType; + ret->finalize(); + return ret; + } RttCanon* makeRttCanon(HeapType heapType) { auto* ret = wasm.allocator.alloc<RttCanon>(); ret->type = Type(Rtt(0, heapType)); |