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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher.cc

Issue 2600773002: Revert of Disable the CompilerDispatcher if we don't have idle time (Closed)
Patch Set: Created 4 years 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 | « src/compiler-dispatcher/compiler-dispatcher.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher.cc
diff --git a/src/compiler-dispatcher/compiler-dispatcher.cc b/src/compiler-dispatcher/compiler-dispatcher.cc
index 5cf10aa3eb8ac012143c4f4b486d0e69c3bcfc1c..1b639fe9b0ad7035969b993a2253397461fa595c 100644
--- a/src/compiler-dispatcher/compiler-dispatcher.cc
+++ b/src/compiler-dispatcher/compiler-dispatcher.cc
@@ -110,8 +110,6 @@
}
bool CompilerDispatcher::Enqueue(Handle<SharedFunctionInfo> function) {
- if (!IsEnabled()) return false;
-
// We only handle functions (no eval / top-level code / wasm) that are
// attached to a script.
if (!function->script()->IsScript() || !function->is_function() ||
@@ -129,11 +127,6 @@
return true;
}
-bool CompilerDispatcher::IsEnabled() const {
- v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate_);
- return FLAG_compiler_dispatcher && platform_->IdleTasksEnabled(v8_isolate);
-}
-
bool CompilerDispatcher::IsEnqueued(Handle<SharedFunctionInfo> function) const {
return GetJobFor(function) != jobs_.end();
}
@@ -190,7 +183,7 @@
void CompilerDispatcher::ScheduleIdleTaskIfNeeded() {
v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate_);
- DCHECK(platform_->IdleTasksEnabled(v8_isolate));
+ if (!platform_->IdleTasksEnabled(v8_isolate)) return;
if (idle_task_scheduled_) return;
if (jobs_.empty()) return;
idle_task_scheduled_ = true;
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698