Commit 783ea6b2 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Remove obsolete {WasmCompiledModule::Reset} method.

In the two remaining places that call the {Reset} method, it is already
guaranteed that the {next_instance} and {prev_instance} is undefined.

R=titzer@chromium.org

Change-Id: Iab2e764d88b7ba710c664fea363951fb6f9132e0
Reviewed-on: https://chromium-review.googlesource.com/1113551Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54009}
parent 6ad42e85
......@@ -1411,9 +1411,7 @@ void InstanceFinalizer(const v8::WeakCallbackInfo<void>& data) {
WasmCompiledModule* current_template = module_object->compiled_module();
DCHECK(!current_template->has_prev_instance());
if (current_template == compiled_module) {
if (!compiled_module->has_next_instance()) {
WasmCompiledModule::Reset(isolate, compiled_module);
} else {
if (compiled_module->has_next_instance()) {
module_object->set_compiled_module(compiled_module->next_instance());
}
}
......@@ -1517,13 +1515,6 @@ Handle<WasmCompiledModule> WasmCompiledModule::Clone(
return ret;
}
void WasmCompiledModule::Reset(Isolate* isolate,
WasmCompiledModule* compiled_module) {
DisallowHeapAllocation no_gc;
compiled_module->reset_prev_instance();
compiled_module->reset_next_instance();
}
void WasmCompiledModule::InsertInChain(WasmModuleObject* module) {
DisallowHeapAllocation no_gc;
WasmCompiledModule* original = module->compiled_module();
......
......@@ -573,7 +573,6 @@ class WasmCompiledModule : public Struct {
static Handle<WasmCompiledModule> Clone(Isolate* isolate,
Handle<WasmCompiledModule> module);
static void Reset(Isolate* isolate, WasmCompiledModule* module);
bool has_instance() const;
......
......@@ -550,8 +550,6 @@ MaybeHandle<WasmModuleObject> DeserializeNativeModule(
Handle<WasmModuleObject> module_object = WasmModuleObject::New(
isolate, export_wrappers, std::move(decode_result.val), env,
std::move(wire_bytes_copy), wire_size, script, Handle<ByteArray>::null());
Handle<WasmCompiledModule> compiled_module(module_object->compiled_module(),
isolate);
NativeModule* native_module = module_object->native_module();
if (FLAG_wasm_lazy_compilation) {
......@@ -568,10 +566,6 @@ MaybeHandle<WasmModuleObject> DeserializeNativeModule(
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
CompileJsToWasmWrappers(isolate, module_object, isolate->counters());
// There are no instances for this module yet, which means we need to reset
// the module into a state as if the last instance was collected.
WasmCompiledModule::Reset(isolate, *compiled_module);
// Log the code within the generated module for profiling.
native_module->LogWasmCodes(isolate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment