summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/pipeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/pipeline.h')
-rw-r--r--deps/v8/src/compiler/pipeline.h41
1 files changed, 14 insertions, 27 deletions
diff --git a/deps/v8/src/compiler/pipeline.h b/deps/v8/src/compiler/pipeline.h
index edb8191862..64befbfe06 100644
--- a/deps/v8/src/compiler/pipeline.h
+++ b/deps/v8/src/compiler/pipeline.h
@@ -13,6 +13,7 @@ namespace v8 {
namespace internal {
class CompilationInfo;
+class CompilationJob;
class RegisterConfiguration;
namespace compiler {
@@ -20,16 +21,18 @@ namespace compiler {
class CallDescriptor;
class Graph;
class InstructionSequence;
-class Linkage;
-class PipelineData;
class Schedule;
+class SourcePositionTable;
-class Pipeline {
+class Pipeline : public AllStatic {
public:
- explicit Pipeline(CompilationInfo* info) : info_(info) {}
+ // Returns a new compilation job for the given function.
+ static CompilationJob* NewCompilationJob(Handle<JSFunction> function);
- // Run the entire pipeline and generate a handle to a code object.
- Handle<Code> GenerateCode();
+ // Returns a new compilation job for the WebAssembly compilation info.
+ static CompilationJob* NewWasmCompilationJob(
+ CompilationInfo* info, Graph* graph, CallDescriptor* descriptor,
+ SourcePositionTable* source_positions);
// 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.
@@ -39,6 +42,10 @@ class Pipeline {
Code::Flags flags,
const char* debug_name);
+ // Run the entire pipeline and generate a handle to a code object suitable for
+ // testing.
+ static Handle<Code> GenerateCodeForTesting(CompilationInfo* info);
+
// 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(CompilationInfo* info,
@@ -58,27 +65,7 @@ class Pipeline {
Schedule* schedule = nullptr);
private:
- // Helpers for executing pipeline phases.
- template <typename Phase>
- void Run();
- template <typename Phase, typename Arg0>
- void Run(Arg0 arg_0);
- template <typename Phase, typename Arg0, typename Arg1>
- void Run(Arg0 arg_0, Arg1 arg_1);
-
- void BeginPhaseKind(const char* phase_kind);
- void RunPrintAndVerify(const char* phase, bool untyped = false);
- Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor);
- void AllocateRegisters(const RegisterConfiguration* config,
- CallDescriptor* descriptor, bool run_verifier);
-
- CompilationInfo* info() const { return info_; }
- Isolate* isolate() const;
-
- CompilationInfo* const info_;
- PipelineData* data_;
-
- DISALLOW_COPY_AND_ASSIGN(Pipeline);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline);
};
} // namespace compiler