diff options
Diffstat (limited to 'deps/v8/src/compiler/pipeline.h')
-rw-r--r-- | deps/v8/src/compiler/pipeline.h | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/deps/v8/src/compiler/pipeline.h b/deps/v8/src/compiler/pipeline.h index 3f8affc61b..95d13f3169 100644 --- a/deps/v8/src/compiler/pipeline.h +++ b/deps/v8/src/compiler/pipeline.h @@ -10,11 +10,11 @@ #include "src/globals.h" #include "src/objects.h" #include "src/objects/code.h" -#include "src/zone/zone-containers.h" namespace v8 { namespace internal { +struct AssemblerOptions; class OptimizedCompilationInfo; class OptimizedCompilationJob; class RegisterConfiguration; @@ -22,6 +22,10 @@ class JumpOptimizationInfo; namespace wasm { enum ModuleOrigin : uint8_t; +struct FunctionBody; +class NativeModule; +class WasmEngine; +struct WasmModule; } // namespace wasm namespace compiler { @@ -37,49 +41,51 @@ class WasmCompilationData; class Pipeline : public AllStatic { public: - // Returns a new compilation job for the given function. - static OptimizedCompilationJob* NewCompilationJob(Handle<JSFunction> function, + // Returns a new compilation job for the given JavaScript function. + static OptimizedCompilationJob* NewCompilationJob(Isolate* isolate, + Handle<JSFunction> function, bool has_script); // Returns a new compilation job for the WebAssembly compilation info. static OptimizedCompilationJob* NewWasmCompilationJob( - OptimizedCompilationInfo* info, Isolate* isolate, MachineGraph* mcgraph, - CallDescriptor* call_descriptor, SourcePositionTable* source_positions, - NodeOriginTable* node_origins, WasmCompilationData* wasm_compilation_data, + OptimizedCompilationInfo* info, wasm::WasmEngine* wasm_engine, + MachineGraph* mcgraph, CallDescriptor* call_descriptor, + SourcePositionTable* source_positions, NodeOriginTable* node_origins, + WasmCompilationData* wasm_compilation_data, + wasm::FunctionBody function_body, wasm::WasmModule* wasm_module, + wasm::NativeModule* native_module, int function_index, wasm::ModuleOrigin wasm_origin); // Run the pipeline on a machine graph and generate code. The {schedule} must // be valid, hence the given {graph} does not need to be schedulable. - static Handle<Code> GenerateCodeForCodeStub( + static MaybeHandle<Code> GenerateCodeForCodeStub( Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, Schedule* schedule, Code::Kind kind, const char* debug_name, uint32_t stub_key, int32_t builtin_index, JumpOptimizationInfo* jump_opt, - PoisoningMitigationLevel poisoning_level); + PoisoningMitigationLevel poisoning_level, + const AssemblerOptions& options); - // Run the entire pipeline and generate a handle to a code object suitable for - // testing. - static Handle<Code> GenerateCodeForTesting(OptimizedCompilationInfo* info, - Isolate* isolate); + // --------------------------------------------------------------------------- + // The following methods are for testing purposes only. Avoid production use. + // --------------------------------------------------------------------------- + + // Run the pipeline on JavaScript bytecode and generate code. + static MaybeHandle<Code> GenerateCodeForTesting( + OptimizedCompilationInfo* info, Isolate* isolate); // Run the pipeline on a machine graph and generate code. If {schedule} is // {nullptr}, then compute a new schedule for code generation. - static Handle<Code> GenerateCodeForTesting(OptimizedCompilationInfo* info, - Isolate* isolate, Graph* graph, - Schedule* schedule = nullptr); + V8_EXPORT_PRIVATE static MaybeHandle<Code> GenerateCodeForTesting( + OptimizedCompilationInfo* info, Isolate* isolate, + CallDescriptor* call_descriptor, Graph* graph, + const AssemblerOptions& options, Schedule* schedule = nullptr, + SourcePositionTable* source_positions = nullptr); // Run just the register allocator phases. V8_EXPORT_PRIVATE static bool AllocateRegistersForTesting( const RegisterConfiguration* config, InstructionSequence* sequence, bool run_verifier); - // Run the pipeline on a machine graph and generate code. If {schedule} is - // {nullptr}, then compute a new schedule for code generation. - V8_EXPORT_PRIVATE static Handle<Code> GenerateCodeForTesting( - OptimizedCompilationInfo* info, Isolate* isolate, - CallDescriptor* call_descriptor, Graph* graph, - Schedule* schedule = nullptr, - SourcePositionTable* source_positions = nullptr); - private: DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline); }; |