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 10 matching lines...) Expand all Loading... |
21 class RegisterConfiguration; | 21 class RegisterConfiguration; |
22 class Schedule; | 22 class Schedule; |
23 | 23 |
24 class Pipeline { | 24 class Pipeline { |
25 public: | 25 public: |
26 explicit Pipeline(CompilationInfo* info) : info_(info) {} | 26 explicit Pipeline(CompilationInfo* info) : info_(info) {} |
27 | 27 |
28 // Run the entire pipeline and generate a handle to a code object. | 28 // Run the entire pipeline and generate a handle to a code object. |
29 Handle<Code> GenerateCode(); | 29 Handle<Code> GenerateCode(); |
30 | 30 |
| 31 // Run the pipeline on an interpreter bytecode handler machine graph and |
| 32 // generate code. |
| 33 static Handle<Code> GenerateCodeForInterpreter( |
| 34 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, |
| 35 Schedule* schedule, const char* bytecode_name); |
| 36 |
31 // Run the pipeline on a machine graph and generate code. If {schedule} is | 37 // Run the pipeline on a machine graph and generate code. If {schedule} is |
32 // {nullptr}, then compute a new schedule for code generation. | 38 // {nullptr}, then compute a new schedule for code generation. |
33 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, | 39 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
34 Graph* graph, | 40 Graph* graph, |
35 Schedule* schedule = nullptr); | 41 Schedule* schedule = nullptr); |
36 | 42 |
37 // Run the pipeline on a machine graph and generate code. If {schedule} is | 43 // Run the pipeline on a machine graph and generate code. If {schedule} is |
38 // {nullptr}, then compute a new schedule for code generation. | 44 // {nullptr}, then compute a new schedule for code generation. |
39 static Handle<Code> GenerateCodeForTesting(Isolate* isolate, | 45 static Handle<Code> GenerateCodeForTesting(Isolate* isolate, |
40 CallDescriptor* call_descriptor, | 46 CallDescriptor* call_descriptor, |
(...skipping 27 matching lines...) Expand all Loading... |
68 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 74 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
69 void AllocateRegisters(const RegisterConfiguration* config, | 75 void AllocateRegisters(const RegisterConfiguration* config, |
70 CallDescriptor* descriptor, bool run_verifier); | 76 CallDescriptor* descriptor, bool run_verifier); |
71 }; | 77 }; |
72 | 78 |
73 } // namespace compiler | 79 } // namespace compiler |
74 } // namespace internal | 80 } // namespace internal |
75 } // namespace v8 | 81 } // namespace v8 |
76 | 82 |
77 #endif // V8_COMPILER_PIPELINE_H_ | 83 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |