OLD | NEW |
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/objects.h" | 10 #include "src/objects.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Schedule* schedule = nullptr); | 73 Schedule* schedule = nullptr); |
74 | 74 |
75 // Returns a new compilation job for the given compilation info. | 75 // Returns a new compilation job for the given compilation info. |
76 static CompilationJob* NewCompilationJob(CompilationInfo* info); | 76 static CompilationJob* NewCompilationJob(CompilationInfo* info); |
77 | 77 |
78 // Returns a new compilation job for the WebAssembly compilation info. | 78 // Returns a new compilation job for the WebAssembly compilation info. |
79 static CompilationJob* NewWasmCompilationJob( | 79 static CompilationJob* NewWasmCompilationJob( |
80 CompilationInfo* info, Graph* graph, CallDescriptor* descriptor, | 80 CompilationInfo* info, Graph* graph, CallDescriptor* descriptor, |
81 SourcePositionTable* source_positions); | 81 SourcePositionTable* source_positions); |
82 | 82 |
83 // TODO(mstarzinger, bmeurer): This shouldn't be public! | 83 private: |
84 bool ScheduleAndSelectInstructions(Linkage* linkage); | 84 // The wasm compilation job calls ScheduleAndSelectInstructions and |
| 85 // RunPrintAndVerify, so we make it a member class. |
| 86 friend class PipelineWasmCompilationJob; |
85 | 87 |
86 private: | |
87 // Helpers for executing pipeline phases. | 88 // Helpers for executing pipeline phases. |
88 template <typename Phase> | 89 template <typename Phase> |
89 void Run(); | 90 void Run(); |
90 template <typename Phase, typename Arg0> | 91 template <typename Phase, typename Arg0> |
91 void Run(Arg0 arg_0); | 92 void Run(Arg0 arg_0); |
92 template <typename Phase, typename Arg0, typename Arg1> | 93 template <typename Phase, typename Arg0, typename Arg1> |
93 void Run(Arg0 arg_0, Arg1 arg_1); | 94 void Run(Arg0 arg_0, Arg1 arg_1); |
94 | 95 |
95 void BeginPhaseKind(const char* phase_kind); | 96 void BeginPhaseKind(const char* phase_kind); |
96 void EndPhaseKind(); | 97 void EndPhaseKind(); |
| 98 bool ScheduleAndSelectInstructions(Linkage* linkage); |
97 void RunPrintAndVerify(const char* phase, bool untyped = false); | 99 void RunPrintAndVerify(const char* phase, bool untyped = false); |
98 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 100 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
99 void AllocateRegisters(const RegisterConfiguration* config, | 101 void AllocateRegisters(const RegisterConfiguration* config, |
100 CallDescriptor* descriptor, bool run_verifier); | 102 CallDescriptor* descriptor, bool run_verifier); |
101 | 103 |
102 CompilationInfo* info() const; | 104 CompilationInfo* info() const; |
103 Isolate* isolate() const; | 105 Isolate* isolate() const; |
104 | 106 |
105 PipelineData* const data_; | 107 PipelineData* const data_; |
106 | 108 |
107 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 109 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
108 }; | 110 }; |
109 | 111 |
110 } // namespace compiler | 112 } // namespace compiler |
111 } // namespace internal | 113 } // namespace internal |
112 } // namespace v8 | 114 } // namespace v8 |
113 | 115 |
114 #endif // V8_COMPILER_PIPELINE_H_ | 116 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |