diff options
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r-- | src/wasm-builder.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 7d839357e..8bf60e59c 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -492,6 +492,18 @@ public: return ret; } Unreachable* makeUnreachable() { return allocator.alloc<Unreachable>(); } + Push* makePush(Expression* value) { + auto* ret = allocator.alloc<Push>(); + ret->value = value; + ret->finalize(); + return ret; + } + Pop* makePop(Type type) { + auto* ret = allocator.alloc<Pop>(); + ret->type = type; + ret->finalize(); + return ret; + } // Additional helpers |