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. |
Michael Starzinger
2015/12/01 18:06:53
nit: I know you didn't introduce this comment, but
danno
2015/12/02 07:00:19
Done.
| |
34 // generate code. | 34 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, |
35 static Handle<Code> GenerateCodeForInterpreter( | 35 CallDescriptor* call_descriptor, |
36 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, | 36 Graph* graph, Schedule* schedule, |
37 Schedule* schedule, const char* bytecode_name); | 37 Code::Kind kind, |
38 const char* bytecode_name); | |
38 | 39 |
39 // Run the pipeline on a machine graph and generate code. If {schedule} is | 40 // Run the pipeline on a machine graph and generate code. If {schedule} is |
40 // {nullptr}, then compute a new schedule for code generation. | 41 // {nullptr}, then compute a new schedule for code generation. |
41 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, | 42 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
42 Graph* graph, | 43 Graph* graph, |
43 Schedule* schedule = nullptr); | 44 Schedule* schedule = nullptr); |
44 | 45 |
45 // Run just the register allocator phases. | 46 // Run just the register allocator phases. |
46 static bool AllocateRegistersForTesting(const RegisterConfiguration* config, | 47 static bool AllocateRegistersForTesting(const RegisterConfiguration* config, |
47 InstructionSequence* sequence, | 48 InstructionSequence* sequence, |
(...skipping 24 matching lines...) Expand all Loading... | |
72 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 73 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
73 void AllocateRegisters(const RegisterConfiguration* config, | 74 void AllocateRegisters(const RegisterConfiguration* config, |
74 CallDescriptor* descriptor, bool run_verifier); | 75 CallDescriptor* descriptor, bool run_verifier); |
75 }; | 76 }; |
76 | 77 |
77 } // namespace compiler | 78 } // namespace compiler |
78 } // namespace internal | 79 } // namespace internal |
79 } // namespace v8 | 80 } // namespace v8 |
80 | 81 |
81 #endif // V8_COMPILER_PIPELINE_H_ | 82 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |