summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 5cca8d959..213edbef5 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -727,9 +727,11 @@ public:
ret->finalize();
return ret;
}
- StructNew* makeStructNew() {
+ template<typename T>
+ StructNew* makeStructNew(Expression* rtt, const T& args) {
auto* ret = wasm.allocator.alloc<StructNew>();
- WASM_UNREACHABLE("TODO (gc): struct.new");
+ ret->rtt = rtt;
+ ret->operands.set(args);
ret->finalize();
return ret;
}