Chromium Code Reviews| 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/objects.h" | 10 #include "src/objects.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 class CompilationInfo; | 15 class CompilationInfo; |
| 16 class OptimizedCompileJob; | 16 class OptimizedCompileJob; |
| 17 class RegisterConfiguration; | 17 class RegisterConfiguration; |
| 18 | 18 |
| 19 namespace compiler { | 19 namespace compiler { |
| 20 | 20 |
| 21 class CallDescriptor; | 21 class CallDescriptor; |
| 22 class Graph; | 22 class Graph; |
| 23 class InstructionSequence; | 23 class InstructionSequence; |
| 24 class Linkage; | 24 class Linkage; |
| 25 class PipelineData; | 25 class PipelineData; |
| 26 class Schedule; | 26 class Schedule; |
| 27 class SourcePositionTable; | |
| 27 | 28 |
| 28 class Pipeline { | 29 class Pipeline { |
| 29 public: | 30 public: |
| 30 explicit Pipeline(CompilationInfo* info) : info_(info), data_(nullptr) {} | 31 explicit Pipeline(CompilationInfo* info) : info_(info), data_(nullptr) {} |
| 31 | 32 |
| 32 // Run the entire pipeline and generate a handle to a code object. | 33 // Run the entire pipeline and generate a handle to a code object. |
| 33 Handle<Code> GenerateCode(); | 34 Handle<Code> GenerateCode(); |
| 34 | 35 |
| 36 // Run the pipeline on a machine graph, compute a new schedule and generate | |
| 37 // code. | |
|
Michael Starzinger
2016/04/22 11:30:21
nit: We could even add "(specifically modeled for
| |
| 38 static Handle<Code> GenerateWASMCode(CompilationInfo* info, | |
| 39 CallDescriptor* call_descriptor, | |
| 40 Graph* graph, | |
| 41 SourcePositionTable* source_positions); | |
| 42 | |
| 35 // Run the pipeline on a machine graph and generate code. The {schedule} must | 43 // Run the pipeline on a machine graph and generate code. The {schedule} must |
| 36 // be valid, hence the given {graph} does not need to be schedulable. | 44 // be valid, hence the given {graph} does not need to be schedulable. |
| 37 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, | 45 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, |
| 38 CallDescriptor* call_descriptor, | 46 CallDescriptor* call_descriptor, |
| 39 Graph* graph, Schedule* schedule, | 47 Graph* graph, Schedule* schedule, |
| 40 Code::Flags flags, | 48 Code::Flags flags, |
| 41 const char* debug_name); | 49 const char* debug_name); |
| 42 | 50 |
| 43 // Run the pipeline on a machine graph and generate code. If {schedule} is | 51 // Run the pipeline on a machine graph and generate code. If {schedule} is |
| 44 // {nullptr}, then compute a new schedule for code generation. | 52 // {nullptr}, then compute a new schedule for code generation. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 PipelineData* data_; | 91 PipelineData* data_; |
| 84 | 92 |
| 85 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 93 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
| 86 }; | 94 }; |
| 87 | 95 |
| 88 } // namespace compiler | 96 } // namespace compiler |
| 89 } // namespace internal | 97 } // namespace internal |
| 90 } // namespace v8 | 98 } // namespace v8 |
| 91 | 99 |
| 92 #endif // V8_COMPILER_PIPELINE_H_ | 100 #endif // V8_COMPILER_PIPELINE_H_ |
| OLD | NEW |