}
-Handle<Code> Pipeline::GenerateCodeForTesting(Isolate* isolate,
- CallDescriptor* call_descriptor,
- Graph* graph,
- Schedule* schedule) {
- CompilationInfo info("testing", isolate, graph->zone());
- return GenerateCodeForTesting(&info, call_descriptor, graph, schedule);
-}
-
-
Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info,
CallDescriptor* call_descriptor,
Graph* graph,
Graph* graph,
Schedule* schedule = nullptr);
- // 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(Isolate* isolate,
- CallDescriptor* call_descriptor,
- Graph* graph,
- Schedule* schedule = nullptr);
-
// Run just the register allocator phases.
static bool AllocateRegistersForTesting(const RegisterConfiguration* config,
InstructionSequence* sequence,
bool run_verifier);
- private:
+ // 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,
CallDescriptor* call_descriptor,
- Graph* graph, Schedule* schedule);
+ Graph* graph,
+ Schedule* schedule = nullptr);
+ private:
CompilationInfo* info_;
PipelineData* data_;
Schedule* schedule = this->Export();
CallDescriptor* call_descriptor = this->call_descriptor();
Graph* graph = this->graph();
- code_ = Pipeline::GenerateCodeForTesting(this->isolate(), call_descriptor,
- graph, schedule);
+ CompilationInfo info("testing", main_isolate(), main_zone());
+ code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph,
+ schedule);
}
return this->code_.ToHandleChecked()->entry();
}
Zone* zone = graph()->zone();
CallDescriptor* desc =
Linkage::GetSimplifiedCDescriptor(zone, this->csig_);
- code_ = Pipeline::GenerateCodeForTesting(main_isolate(), desc, graph());
+ CompilationInfo info("testing", main_isolate(), main_zone());
+ code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph());
#ifdef ENABLE_DISASSEMBLER
if (!code_.is_null() && FLAG_print_opt_code) {
OFStream os(stdout);
Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph,
Schedule* schedule = nullptr) {
Isolate* isolate = CcTest::InitIsolateOnce();
+ CompilationInfo info("testing", isolate, graph->zone());
Handle<Code> code =
- Pipeline::GenerateCodeForTesting(isolate, desc, graph, schedule);
+ Pipeline::GenerateCodeForTesting(&info, desc, graph, schedule);
CHECK(!code.is_null());
#ifdef ENABLE_DISASSEMBLER
if (FLAG_print_opt_code) {