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

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

Issue 2627543003: [wasm] Prerequisites for WebAssembly Table.Grow (Closed)
Patch Set: Rename update function Created 3 years, 11 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/compiler/test-run-wasm-machops.cc ('k') | no next file » | 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 5b727ec2892c968e0419d3a0274b06272a08940e..3cf5a8e580ea0196ceb0f09e7e6c68e1281bc9b6 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -247,7 +247,9 @@ class TestingModule : public ModuleEnv {
}
instance->function_tables.push_back(
- isolate_->factory()->NewFixedArray(table_size * 2));
+ isolate_->factory()->NewFixedArray(table_size));
+ instance->signature_tables.push_back(
+ isolate_->factory()->NewFixedArray(table_size));
}
void PopulateIndirectFunctionTable() {
@@ -255,13 +257,13 @@ class TestingModule : public ModuleEnv {
// Initialize the fixed arrays in instance->function_tables.
for (uint32_t i = 0; i < instance->function_tables.size(); i++) {
WasmIndirectFunctionTable& table = module_.function_tables[i];
- Handle<FixedArray> array = instance->function_tables[i];
+ Handle<FixedArray> function_table = instance->function_tables[i];
+ Handle<FixedArray> signature_table = instance->signature_tables[i];
int table_size = static_cast<int>(table.values.size());
for (int j = 0; j < table_size; j++) {
WasmFunction& function = module_.functions[table.values[j]];
- array->set(j, Smi::FromInt(table.map.Find(function.sig)));
- array->set(j + table_size,
- *instance->function_code[function.func_index]);
+ signature_table->set(j, Smi::FromInt(table.map.Find(function.sig)));
+ function_table->set(j, *instance->function_code[function.func_index]);
}
}
}
« no previous file with comments | « test/cctest/compiler/test-run-wasm-machops.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698