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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 4dc195d5c..86a6460d5 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -96,9 +96,14 @@ public:
// Switch
// CallBase
// Call
- // CallImport
// Also do a version which takes a sig?
- CallIndirect* makeCallIndirect(FunctionType* type, Expression* target, std::vector<Expression*>&& args) {
+ CallImport* makeCallImport(Name target, const std::vector<Expression*>& args) {
+ auto* call = allocator.alloc<CallImport>();
+ call->target = target;
+ call->operands.set(args);
+ return call;
+ }
+ CallIndirect* makeCallIndirect(FunctionType* type, Expression* target, const std::vector<Expression*>& args) {
auto* call = allocator.alloc<CallIndirect>();
call->fullType = type;
call->type = type->result;