summaryrefslogtreecommitdiff
path: root/src/passes/GenerateDynCalls.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2024-11-07 15:53:01 -0800
committerGitHub <noreply@github.com>2024-11-07 23:53:01 +0000
commita3d940ff8020ad8adb525b4ab018fcd86d08c54a (patch)
tree35b5f3fada3b53f36c949825a288c3dec8884cd1 /src/passes/GenerateDynCalls.cpp
parent7a0e738e363d13880ec25018134e178d57c5ba6a (diff)
downloadbinaryen-a3d940ff8020ad8adb525b4ab018fcd86d08c54a.tar.gz
binaryen-a3d940ff8020ad8adb525b4ab018fcd86d08c54a.tar.bz2
binaryen-a3d940ff8020ad8adb525b4ab018fcd86d08c54a.zip
Rename indexType -> addressType. NFC (#7060)
See https://github.com/WebAssembly/memory64/pull/92
Diffstat (limited to 'src/passes/GenerateDynCalls.cpp')
-rw-r--r--src/passes/GenerateDynCalls.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/passes/GenerateDynCalls.cpp b/src/passes/GenerateDynCalls.cpp
index 6e6e0a717..8d2f3fa24 100644
--- a/src/passes/GenerateDynCalls.cpp
+++ b/src/passes/GenerateDynCalls.cpp
@@ -146,11 +146,12 @@ void GenerateDynCalls::generateDynCallThunk(HeapType funcType) {
auto* table = wasm->addTable(Builder::makeTable(Name::fromInt(0)));
table->module = ENV;
table->base = "__indirect_function_table";
- table->indexType = wasm->memories[0]->indexType;
+ table->addressType = wasm->memories[0]->addressType;
}
auto& table = wasm->tables[0];
- namedParams.emplace_back("fptr", table->indexType); // function pointer param
- params.push_back(table->indexType);
+ namedParams.emplace_back("fptr",
+ table->addressType); // function pointer param
+ params.push_back(table->addressType);
int p = 0;
for (const auto& param : sig.params) {
namedParams.emplace_back(std::to_string(p++), param);
@@ -159,7 +160,7 @@ void GenerateDynCalls::generateDynCallThunk(HeapType funcType) {
auto f = builder.makeFunction(
name, std::move(namedParams), Signature(Type(params), sig.results), {});
f->hasExplicitName = true;
- Expression* fptr = builder.makeLocalGet(0, table->indexType);
+ Expression* fptr = builder.makeLocalGet(0, table->addressType);
std::vector<Expression*> args;
Index i = 0;
for (const auto& param : sig.params) {