Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: test/cctest/wasm/wasm-run-utils.h

Issue 2403093002: [wasm] Canonicalize function signature indices for matching in indirect calls. (Closed)
Patch Set: Address review comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/mjsunit/wasm/indirect-calls.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index dc70b909e54803fc12ed1af16322e1cae20c160d..8bf1d3e5c75fb12b1a32d8d72e33bdd8ee428777 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -227,10 +227,13 @@ class TestingModule : public ModuleEnv {
}
void AddIndirectFunctionTable(uint16_t* functions, uint32_t table_size) {
- module_.function_tables.push_back(
- {table_size, table_size, std::vector<int32_t>(), false, false});
+ module_.function_tables.push_back({table_size, table_size,
+ std::vector<int32_t>(), false, false,
+ SignatureMap()});
+ WasmIndirectFunctionTable& table = module_.function_tables.back();
for (uint32_t i = 0; i < table_size; ++i) {
- module_.function_tables.back().values.push_back(functions[i]);
+ table.values.push_back(functions[i]);
+ table.map.FindOrInsert(module_.functions[functions[i]].sig);
}
Handle<FixedArray> values = BuildFunctionTable(
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/mjsunit/wasm/indirect-calls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698