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 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 Schedule* schedule = NULL); | 35 Schedule* schedule = NULL); |
36 | 36 |
37 static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; } | 37 static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; } |
38 static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; } | 38 static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; } |
39 | 39 |
40 static void SetUp(); | 40 static void SetUp(); |
41 static void TearDown(); | 41 static void TearDown(); |
42 | 42 |
43 private: | 43 private: |
44 CompilationInfo* info_; | 44 CompilationInfo* info_; |
| 45 PipelineData* data_; |
| 46 |
| 47 // Helpers for executing pipeline phases. |
| 48 template <typename Phase> |
| 49 void Run(); |
| 50 template <typename Phase, typename Arg0> |
| 51 void Run(Arg0 arg_0); |
| 52 template <typename Phase, typename Arg0, typename Arg1> |
| 53 void Run(Arg0 arg_0, Arg1 arg_1); |
45 | 54 |
46 CompilationInfo* info() const { return info_; } | 55 CompilationInfo* info() const { return info_; } |
47 Isolate* isolate() { return info_->isolate(); } | 56 Isolate* isolate() { return info_->isolate(); } |
48 | 57 |
49 void ComputeSchedule(PipelineData* data); | 58 void RunPrintAndVerify(const char* phase, bool untyped = false); |
50 void VerifyAndPrintGraph(Graph* graph, const char* phase, | 59 void GenerateCode(Linkage* linkage); |
51 bool untyped = false); | |
52 Handle<Code> GenerateCode(Linkage* linkage, PipelineData* data); | |
53 }; | 60 }; |
54 } | 61 |
55 } | 62 } // namespace compiler |
56 } // namespace v8::internal::compiler | 63 } // namespace internal |
| 64 } // namespace v8 |
57 | 65 |
58 #endif // V8_COMPILER_PIPELINE_H_ | 66 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |