Commit 8e0b2d1f authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove compile job when finishing the module

The {AsyncCompileJob} can now always be deleted when initial
compilation finished. The previous conditions are redudant, since
{baseline_compilation_finished()} is always true when calling
{FinishModule()}.

R=ahaas@chromium.org

Bug: v8:8689
Change-Id: I95c0cf83943630b83216c83db0edbabdfbd71284
Reviewed-on: https://chromium-review.googlesource.com/c/1494008Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59962}
parent a6426cb8
......@@ -1245,21 +1245,7 @@ void AsyncCompileJob::CompileWrappers() {
void AsyncCompileJob::FinishModule() {
TRACE_COMPILE("(6) Finish module...\n");
AsyncCompileSucceeded(module_object_);
size_t num_functions = native_module_->num_functions() -
native_module_->num_imported_functions();
auto* compilation_state = Impl(native_module_->compilation_state());
if (compilation_state->compile_mode() == CompileMode::kRegular ||
num_functions == 0) {
// If we do not tier up, the async compile job is done here and
// can be deleted.
isolate_->wasm_engine()->RemoveCompileJob(this);
return;
}
DCHECK_EQ(CompileMode::kTiering, compilation_state->compile_mode());
if (compilation_state->baseline_compilation_finished()) {
isolate_->wasm_engine()->RemoveCompileJob(this);
}
isolate_->wasm_engine()->RemoveCompileJob(this);
}
AsyncStreamingProcessor::AsyncStreamingProcessor(AsyncCompileJob* job)
......
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