Merge V8 5.2.361.47 DO NOT MERGE
https://chromium.googlesource.com/v8/v8/+/5.2.361.47
FPIIM-449
Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h
index edb8191..64befbf 100644
--- a/src/compiler/pipeline.h
+++ b/src/compiler/pipeline.h
@@ -13,6 +13,7 @@
namespace internal {
class CompilationInfo;
+class CompilationJob;
class RegisterConfiguration;
namespace compiler {
@@ -20,16 +21,18 @@
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 @@
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 @@
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