Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 static OptimizedCompileJob* NewCompilationJob(CompilationInfo* info); | 76 static OptimizedCompileJob* 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 OptimizedCompileJob* NewWasmCompilationJob( | 79 static OptimizedCompileJob* 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 // TODO(mstarzinger, bmeurer): This shouldn't be public! |
| 84 bool ScheduleAndSelectInstructions(Linkage* linkage); | 84 bool ScheduleAndSelectInstructions(Linkage* linkage); |
| 85 | 85 |
| 86 // TODO(mstarzinger, bmeurer): This shouldn't be public! | |
| 87 void RunPrintAndVerify(const char* phase, bool untyped = false); | |
|
titzer
2016/04/28 08:39:58
I think it'd be better to make PipelineWasmCompila
Clemens Hammacher
2016/04/28 15:30:09
Yes, I think this is nicer, even though the Pipeli
| |
| 88 | |
| 86 private: | 89 private: |
| 87 // Helpers for executing pipeline phases. | 90 // Helpers for executing pipeline phases. |
| 88 template <typename Phase> | 91 template <typename Phase> |
| 89 void Run(); | 92 void Run(); |
| 90 template <typename Phase, typename Arg0> | 93 template <typename Phase, typename Arg0> |
| 91 void Run(Arg0 arg_0); | 94 void Run(Arg0 arg_0); |
| 92 template <typename Phase, typename Arg0, typename Arg1> | 95 template <typename Phase, typename Arg0, typename Arg1> |
| 93 void Run(Arg0 arg_0, Arg1 arg_1); | 96 void Run(Arg0 arg_0, Arg1 arg_1); |
| 94 | 97 |
| 95 void BeginPhaseKind(const char* phase_kind); | 98 void BeginPhaseKind(const char* phase_kind); |
| 96 void EndPhaseKind(); | 99 void EndPhaseKind(); |
| 97 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 |