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

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

Issue 2784233004: [wasm] Further simplify WasmCompiledModule. (Closed)
Patch Set: . Created 3 years, 8 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
« src/wasm/wasm-module.cc ('K') | « src/wasm/wasm-objects.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 8b678efffe2e777583cbaf93ec9f87a56881cc58..2734af7ac9a992f75bf5b6824f4ddf3d09490b6c 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -359,15 +359,11 @@ class TestingModule : public ModuleEnv {
Handle<WasmSharedModuleData> shared_module_data =
WasmSharedModuleData::New(isolate_, module_wrapper, empty_string,
script, Handle<ByteArray>::null());
- Handle<WasmCompiledModule> compiled_module =
- WasmCompiledModule::New(isolate_, shared_module_data);
- // Minimally initialize the compiled module such that IsWasmCompiledModule
- // passes.
- // If tests need more (correct) information, add it later.
- compiled_module->set_min_mem_pages(0);
- compiled_module->set_max_mem_pages(Smi::kMaxValue);
Handle<FixedArray> code_table = isolate_->factory()->NewFixedArray(0);
- compiled_module->set_code_table(code_table);
+
+ Handle<WasmCompiledModule> compiled_module = WasmCompiledModule::New(
+ isolate_, shared_module_data, code_table, MaybeHandle<FixedArray>(),
+ MaybeHandle<FixedArray>());
Handle<FixedArray> weak_exported = isolate_->factory()->NewFixedArray(0);
compiled_module->set_weak_exported_functions(weak_exported);
DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module));
@@ -587,7 +583,7 @@ class WasmFunctionCompiler : private GraphAndBuilders {
static_cast<int>(function_index()) + 1);
code_table->CopyTo(0, *new_arr, 0, code_table->length());
code_table = new_arr;
- compiled_module->set_code_table(code_table);
+ compiled_module->ReplaceCodeTableForTesting(code_table);
}
DCHECK(code_table->get(static_cast<int>(function_index()))
->IsUndefined(isolate()));
« src/wasm/wasm-module.cc ('K') | « src/wasm/wasm-objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698