diff options
Diffstat (limited to 'src/wasm/wasm-ir-builder.cpp')
-rw-r--r-- | src/wasm/wasm-ir-builder.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wasm/wasm-ir-builder.cpp b/src/wasm/wasm-ir-builder.cpp index ed81a5c18..5bc2c15ba 100644 --- a/src/wasm/wasm-ir-builder.cpp +++ b/src/wasm/wasm-ir-builder.cpp @@ -867,7 +867,14 @@ Result<> IRBuilder::makeCall(Name func, bool isReturn) { return Ok{}; } -// Result<> IRBuilder::makeCallIndirect() {} +Result<> IRBuilder::makeCallIndirect(Name table, HeapType type, bool isReturn) { + CallIndirect curr(wasm.allocator); + curr.heapType = type; + CHECK_ERR(visitCallIndirect(&curr)); + push(builder.makeCallIndirect( + table, curr.target, curr.operands, type, isReturn)); + return Ok{}; +} Result<> IRBuilder::makeLocalGet(Index local) { push(builder.makeLocalGet(local, func->getLocalType(local))); |