Chromium Code Reviews| Index: src/compiler/pipeline.h |
| diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h |
| index 240ff69f59c58d46c57e3d5180e1125981db9aa7..c03369281e43bc87f8f2eb581db23615b12f6e23 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. |
|
Michael Starzinger
2015/06/22 11:26:31
nit: Can we extend the comment explaining that the
|
| + 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,15 @@ 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 EndPhaseKind(); |
| 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); |