diff options
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r-- | src/wasm-builder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h index ad404c337..e451f9e2b 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -82,6 +82,12 @@ public: ret->name = name; return ret; } + Block* makeBlock(const std::vector<Expression*>& items) { + auto* ret = allocator.alloc<Block>(); + ret->list.set(items); + ret->finalize(); + return ret; + } If* makeIf(Expression* condition, Expression* ifTrue, Expression* ifFalse = nullptr) { auto* ret = allocator.alloc<If>(); ret->condition = condition; ret->ifTrue = ifTrue; ret->ifFalse = ifFalse; |