Commit 65e3cea3 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Remove dead {NumberOfBackgroundTasks} method

The background compilation logic moved to the {CompilationState}, so
the {NumberOfBackgroundTasks} is now always 1.

R=mstarzinger@chromium.org

Bug: chromium:869420
Change-Id: I5860f46db953778890c842af4507e8d989e34784
Reviewed-on: https://chromium-review.googlesource.com/1158581
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54847}
parent 269ea5ae
......@@ -2203,9 +2203,6 @@ void AsyncCompileJob::AsyncCompileSucceeded(Handle<WasmModuleObject> result) {
// task) and schedule the next step(s), if any.
class AsyncCompileJob::CompileStep {
public:
explicit CompileStep(int num_background_tasks = 0)
: num_background_tasks_(num_background_tasks) {}
virtual ~CompileStep() {}
void Run(bool on_foreground) {
......@@ -2224,10 +2221,7 @@ class AsyncCompileJob::CompileStep {
virtual void RunInForeground() { UNREACHABLE(); }
virtual void RunInBackground() { UNREACHABLE(); }
int NumberOfBackgroundTasks() { return num_background_tasks_; }
AsyncCompileJob* job_ = nullptr;
const int num_background_tasks_;
};
class AsyncCompileJob::CompileTask : public CancelableTask {
......@@ -2300,10 +2294,7 @@ void AsyncCompileJob::StartBackgroundTask() {
template <typename Step, typename... Args>
void AsyncCompileJob::DoAsync(Args&&... args) {
NextStep<Step>(std::forward<Args>(args)...);
int end = step_->NumberOfBackgroundTasks();
for (int i = 0; i < end; ++i) {
StartBackgroundTask();
}
StartBackgroundTask();
}
template <typename Step, typename... Args>
......@@ -2317,8 +2308,6 @@ void AsyncCompileJob::NextStep(Args&&... args) {
//==========================================================================
class AsyncCompileJob::DecodeModule : public AsyncCompileJob::CompileStep {
public:
DecodeModule() : CompileStep(1) {}
void RunInBackground() override {
ModuleResult result;
{
......
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