| 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/globals.h" | 10 #include "src/globals.h" |
| 11 #include "src/objects.h" | 11 #include "src/objects.h" |
| 12 #include "src/zone/zone-containers.h" |
| 12 | 13 |
| 13 namespace v8 { | 14 namespace v8 { |
| 14 namespace internal { | 15 namespace internal { |
| 15 | 16 |
| 16 class CompilationInfo; | 17 class CompilationInfo; |
| 17 class CompilationJob; | 18 class CompilationJob; |
| 18 class RegisterConfiguration; | 19 class RegisterConfiguration; |
| 19 | 20 |
| 21 namespace trap_handler { |
| 22 struct ProtectedInstructionData; |
| 23 } // namespace trap_handler |
| 24 |
| 20 namespace compiler { | 25 namespace compiler { |
| 21 | 26 |
| 22 class CallDescriptor; | 27 class CallDescriptor; |
| 23 class JSGraph; | 28 class JSGraph; |
| 24 class Graph; | 29 class Graph; |
| 25 class InstructionSequence; | 30 class InstructionSequence; |
| 26 class Schedule; | 31 class Schedule; |
| 27 class SourcePositionTable; | 32 class SourcePositionTable; |
| 28 | 33 |
| 29 class Pipeline : public AllStatic { | 34 class Pipeline : public AllStatic { |
| 30 public: | 35 public: |
| 31 // Returns a new compilation job for the given function. | 36 // Returns a new compilation job for the given function. |
| 32 static CompilationJob* NewCompilationJob(Handle<JSFunction> function); | 37 static CompilationJob* NewCompilationJob(Handle<JSFunction> function); |
| 33 | 38 |
| 34 // Returns a new compilation job for the WebAssembly compilation info. | 39 // Returns a new compilation job for the WebAssembly compilation info. |
| 35 static CompilationJob* NewWasmCompilationJob( | 40 static CompilationJob* NewWasmCompilationJob( |
| 36 CompilationInfo* info, JSGraph* jsgraph, CallDescriptor* descriptor, | 41 CompilationInfo* info, JSGraph* jsgraph, CallDescriptor* descriptor, |
| 37 SourcePositionTable* source_positions); | 42 SourcePositionTable* source_positions, |
| 43 ZoneVector<trap_handler::ProtectedInstructionData>* |
| 44 protected_instructions); |
| 38 | 45 |
| 39 // Run the pipeline on a machine graph and generate code. The {schedule} must | 46 // Run the pipeline on a machine graph and generate code. The {schedule} must |
| 40 // be valid, hence the given {graph} does not need to be schedulable. | 47 // be valid, hence the given {graph} does not need to be schedulable. |
| 41 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, | 48 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, |
| 42 CallDescriptor* call_descriptor, | 49 CallDescriptor* call_descriptor, |
| 43 Graph* graph, Schedule* schedule, | 50 Graph* graph, Schedule* schedule, |
| 44 Code::Flags flags, | 51 Code::Flags flags, |
| 45 const char* debug_name); | 52 const char* debug_name); |
| 46 | 53 |
| 47 // Run the entire pipeline and generate a handle to a code object suitable for | 54 // Run the entire pipeline and generate a handle to a code object suitable for |
| (...skipping 20 matching lines...) Expand all Loading... |
| 68 | 75 |
| 69 private: | 76 private: |
| 70 DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline); | 77 DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline); |
| 71 }; | 78 }; |
| 72 | 79 |
| 73 } // namespace compiler | 80 } // namespace compiler |
| 74 } // namespace internal | 81 } // namespace internal |
| 75 } // namespace v8 | 82 } // namespace v8 |
| 76 | 83 |
| 77 #endif // V8_COMPILER_PIPELINE_H_ | 84 #endif // V8_COMPILER_PIPELINE_H_ |
| OLD | NEW |