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

Unified Diff: src/compiler.h

Issue 2251713002: [Compiler] Add compile to CompilerDispatcherJob. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_compilerdispatcher
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index f7d89cd56493125ce0db7680661601b41d512be5..73958ad2fead5d2ef5d0742cd47b29f5427c099d 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -54,8 +54,12 @@ class Compiler : public AllStatic {
static bool CompileDebugCode(Handle<SharedFunctionInfo> shared);
static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script);
+ // Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse.
+ static CompilationJob* PrepareUnoptimizedCompilationJob(
Michael Starzinger 2016/08/19 10:54:14 This API method doesn't seem to be used nor implem
Michael Starzinger 2016/08/19 10:57:10 Ooops, overlooked the obvious. Please disregard th
+ CompilationInfo* info);
+
// Generate and install code from previously queued compilation job.
- static void FinalizeCompilationJob(CompilationJob* job);
+ static bool FinalizeCompilationJob(CompilationJob* job);
// Give the compiler a chance to perform low-latency initialization tasks of
// the given {function} on its instantiation. Note that only the runtime will
@@ -589,8 +593,6 @@ class CompilationJob {
return FAILED;
}
- void RecordOptimizationStats();
-
State state() const { return state_; }
CompilationInfo* info() const { return info_; }
Isolate* isolate() const { return info()->isolate(); }
@@ -602,6 +604,17 @@ class CompilationJob {
virtual Status FinalizeJobImpl() = 0;
private:
+ void RecordOptimizedCompilationStats() const;
+ void RecordUnoptimizedCompilationStats() const;
+
+ void RecordCompilationStats() const {
Michael Starzinger 2016/08/19 10:54:14 nit: I'm not sure the job itself should record sta
rmcilroy 2016/08/22 13:27:08 Done.
+ if (info_->IsOptimizing()) {
+ RecordOptimizedCompilationStats();
+ } else {
+ RecordUnoptimizedCompilationStats();
+ }
+ }
+
CompilationInfo* info_;
base::TimeDelta time_taken_to_prepare_;
base::TimeDelta time_taken_to_execute_;
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698