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

Side by Side Diff: src/compiler/pipeline.h

Issue 1698113002: [turbofan] Make pipeline.h independent of compiler.h. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_PIPELINE_H_ 5 #ifndef V8_COMPILER_PIPELINE_H_
6 #define V8_COMPILER_PIPELINE_H_ 6 #define V8_COMPILER_PIPELINE_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/compiler.h" 10 #include "src/objects.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 class CompilationInfo;
15 class RegisterConfiguration; 16 class RegisterConfiguration;
16 17
17 namespace compiler { 18 namespace compiler {
18 19
19 class CallDescriptor; 20 class CallDescriptor;
20 class Graph; 21 class Graph;
21 class InstructionSequence; 22 class InstructionSequence;
22 class Linkage; 23 class Linkage;
23 class PipelineData; 24 class PipelineData;
24 class Schedule; 25 class Schedule;
(...skipping 25 matching lines...) Expand all
50 bool run_verifier); 51 bool run_verifier);
51 52
52 // Run the pipeline on a machine graph and generate code. If {schedule} is 53 // Run the pipeline on a machine graph and generate code. If {schedule} is
53 // {nullptr}, then compute a new schedule for code generation. 54 // {nullptr}, then compute a new schedule for code generation.
54 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, 55 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info,
55 CallDescriptor* call_descriptor, 56 CallDescriptor* call_descriptor,
56 Graph* graph, 57 Graph* graph,
57 Schedule* schedule = nullptr); 58 Schedule* schedule = nullptr);
58 59
59 private: 60 private:
60 CompilationInfo* info_;
61 PipelineData* data_;
62
63 // Helpers for executing pipeline phases. 61 // Helpers for executing pipeline phases.
64 template <typename Phase> 62 template <typename Phase>
65 void Run(); 63 void Run();
66 template <typename Phase, typename Arg0> 64 template <typename Phase, typename Arg0>
67 void Run(Arg0 arg_0); 65 void Run(Arg0 arg_0);
68 template <typename Phase, typename Arg0, typename Arg1> 66 template <typename Phase, typename Arg0, typename Arg1>
69 void Run(Arg0 arg_0, Arg1 arg_1); 67 void Run(Arg0 arg_0, Arg1 arg_1);
70 68
71 CompilationInfo* info() const { return info_; }
72 Isolate* isolate() { return info_->isolate(); }
73
74 void BeginPhaseKind(const char* phase_kind); 69 void BeginPhaseKind(const char* phase_kind);
75 void RunPrintAndVerify(const char* phase, bool untyped = false); 70 void RunPrintAndVerify(const char* phase, bool untyped = false);
76 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); 71 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor);
77 void AllocateRegisters(const RegisterConfiguration* config, 72 void AllocateRegisters(const RegisterConfiguration* config,
78 CallDescriptor* descriptor, bool run_verifier); 73 CallDescriptor* descriptor, bool run_verifier);
74
75 CompilationInfo* info() const { return info_; }
76 Isolate* isolate() const;
77
78 CompilationInfo* const info_;
79 PipelineData* data_;
80
81 DISALLOW_COPY_AND_ASSIGN(Pipeline);
79 }; 82 };
80 83
81 } // namespace compiler 84 } // namespace compiler
82 } // namespace internal 85 } // namespace internal
83 } // namespace v8 86 } // namespace v8
84 87
85 #endif // V8_COMPILER_PIPELINE_H_ 88 #endif // V8_COMPILER_PIPELINE_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698