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 interpreter bytecode handler machine graph and | 33 // Run the pipeline on an code stub machine graph and generate code. A valid |
34 // generate code. | 34 // schedule must be provided. |
35 static Handle<Code> GenerateCodeForInterpreter( | 35 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, |
36 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, | 36 CallDescriptor* call_descriptor, |
37 Schedule* schedule, const char* bytecode_name); | 37 Graph* graph, Schedule* schedule, |
| 38 Code::Kind kind, |
| 39 const char* bytecode_name); |
38 | 40 |
39 // 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 |
40 // {nullptr}, then compute a new schedule for code generation. | 42 // {nullptr}, then compute a new schedule for code generation. |
41 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, | 43 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
42 Graph* graph, | 44 Graph* graph, |
43 Schedule* schedule = nullptr); | 45 Schedule* schedule = nullptr); |
44 | 46 |
45 // Run just the register allocator phases. | 47 // Run just the register allocator phases. |
46 static bool AllocateRegistersForTesting(const RegisterConfiguration* config, | 48 static bool AllocateRegistersForTesting(const RegisterConfiguration* config, |
47 InstructionSequence* sequence, | 49 InstructionSequence* sequence, |
(...skipping 24 matching lines...) Expand all Loading... |
72 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 74 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
73 void AllocateRegisters(const RegisterConfiguration* config, | 75 void AllocateRegisters(const RegisterConfiguration* config, |
74 CallDescriptor* descriptor, bool run_verifier); | 76 CallDescriptor* descriptor, bool run_verifier); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace compiler | 79 } // namespace compiler |
78 } // namespace internal | 80 } // namespace internal |
79 } // namespace v8 | 81 } // namespace v8 |
80 | 82 |
81 #endif // V8_COMPILER_PIPELINE_H_ | 83 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |