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/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class PipelineData; | 23 class PipelineData; |
24 class Schedule; | 24 class Schedule; |
25 | 25 |
26 class Pipeline { | 26 class Pipeline { |
27 public: | 27 public: |
28 explicit Pipeline(CompilationInfo* info) : info_(info) {} | 28 explicit Pipeline(CompilationInfo* info) : info_(info) {} |
29 | 29 |
30 // Run the entire pipeline and generate a handle to a code object. | 30 // Run the entire pipeline and generate a handle to a code object. |
31 Handle<Code> GenerateCode(); | 31 Handle<Code> GenerateCode(); |
32 | 32 |
33 // Run the pipeline on an code stub machine graph and generate code. A valid | 33 // Run the pipeline on a machine graph and generate code. The {schedule} must |
34 // schedule must be provided. | 34 // be valid, hence the given {graph} does not need to be schedulable. |
35 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, | 35 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, |
36 CallDescriptor* call_descriptor, | 36 CallDescriptor* call_descriptor, |
37 Graph* graph, Schedule* schedule, | 37 Graph* graph, Schedule* schedule, |
38 Code::Kind kind, | 38 Code::Kind kind, |
39 const char* bytecode_name); | 39 const char* bytecode_name); |
40 | 40 |
41 // Run the pipeline on a machine graph and generate code. If {schedule} is | 41 // Run the pipeline on a machine graph and generate code. If {schedule} is |
42 // {nullptr}, then compute a new schedule for code generation. | 42 // {nullptr}, then compute a new schedule for code generation. |
43 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, | 43 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
44 Graph* graph, | 44 Graph* graph, |
(...skipping 29 matching lines...) Expand all Loading... |
74 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 74 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
75 void AllocateRegisters(const RegisterConfiguration* config, | 75 void AllocateRegisters(const RegisterConfiguration* config, |
76 CallDescriptor* descriptor, bool run_verifier); | 76 CallDescriptor* descriptor, bool run_verifier); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace compiler | 79 } // namespace compiler |
80 } // namespace internal | 80 } // namespace internal |
81 } // namespace v8 | 81 } // namespace v8 |
82 | 82 |
83 #endif // V8_COMPILER_PIPELINE_H_ | 83 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |