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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 6800aa2ed..50a6e97fb 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -257,6 +257,19 @@ public:
call->finalize();
return call;
}
+ template<typename T>
+ CallRef* makeCallRef(Expression* target,
+ const T& args,
+ Type type,
+ bool isReturn = false) {
+ auto* call = wasm.allocator.alloc<CallRef>();
+ call->type = type;
+ call->target = target;
+ call->operands.set(args);
+ call->isReturn = isReturn;
+ call->finalize();
+ return call;
+ }
LocalGet* makeLocalGet(Index index, Type type) {
auto* ret = wasm.allocator.alloc<LocalGet>();
ret->index = index;