Index: src/compiler/pipeline.h |
diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h |
index 240ff69f59c58d46c57e3d5180e1125981db9aa7..df4feb18cd3dd339abf1102a8f8d1ac79d5e723c 100644 |
--- a/src/compiler/pipeline.h |
+++ b/src/compiler/pipeline.h |
@@ -21,9 +21,15 @@ class PipelineData; |
class RegisterConfiguration; |
class Schedule; |
-class Pipeline { |
+class Pipeline final { |
public: |
- explicit Pipeline(CompilationInfo* info) : info_(info) {} |
+ explicit Pipeline(CompilationInfo* info); |
+ ~Pipeline(); |
+ |
+ // Separate pipeline steps. |
+ bool CreateGraph(); |
+ bool OptimizeGraph(); |
+ Handle<Code> CreateCode() { return DoGenerateCode(); } |
// Run the entire pipeline and generate a handle to a code object. |
Handle<Code> GenerateCode(); |
@@ -50,12 +56,15 @@ class Pipeline { |
static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; } |
private: |
+ explicit Pipeline(PipelineData* data) : data_(data) { |
+ DCHECK_NOT_NULL(data_); |
+ } |
+ |
static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
CallDescriptor* call_descriptor, |
Graph* graph, Schedule* schedule); |
- CompilationInfo* info_; |
- PipelineData* data_; |
+ PipelineData* const data_; |
// Helpers for executing pipeline phases. |
template <typename Phase> |
@@ -63,11 +72,14 @@ class Pipeline { |
template <typename Phase, typename Arg0> |
void Run(Arg0 arg_0); |
- CompilationInfo* info() const { return info_; } |
- Isolate* isolate() { return info_->isolate(); } |
+ PipelineData* data() const { return data_; } |
+ CompilationInfo* info() const; |
+ Isolate* isolate() const { return info()->isolate(); } |
void BeginPhaseKind(const char* phase_kind); |
void RunPrintAndVerify(const char* phase, bool untyped = false); |
+ bool ScheduleAndAllocateRegisters(CallDescriptor* call_descriptor); |
+ Handle<Code> DoGenerateCode(); |
Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
void AllocateRegisters(const RegisterConfiguration* config, |
bool run_verifier); |