Commit a0f7cafa authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Unify pipeline entry for all assemblers.

This uses the same pipeline entry function for all three assemblers
currently supported by TurboFan. The Pipeline::GenerateCodeForCodeStub
is by now generic enough to accommodate all uses.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/1521363003

Cr-Commit-Position: refs/heads/master@{#32837}
parent e9606365
......@@ -175,13 +175,10 @@ MaybeHandle<Code> FastAccessorAssembler::Build() {
labels_.clear();
// Export the schedule and call the compiler.
CompilationInfo info("FastAccessorAssembler", assembler_->isolate(), zone());
Schedule* schedule = assembler_->Export();
// TODO(vogelheim): Pipeline should have a dedicated entry point for this
// assembler.
MaybeHandle<Code> code = Pipeline::GenerateCodeForTesting(
&info, assembler_->call_descriptor(), assembler_->graph(), schedule);
MaybeHandle<Code> code = Pipeline::GenerateCodeForCodeStub(
assembler_->isolate(), assembler_->call_descriptor(), assembler_->graph(),
schedule, Code::STUB, "FastAccessorAssembler");
// Update state & return.
state_ = !code.is_null() ? kBuilt : kError;
......
......@@ -1210,8 +1210,8 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
CallDescriptor* call_descriptor,
Graph* graph, Schedule* schedule,
Code::Kind kind,
const char* code_stub_name) {
CompilationInfo info(code_stub_name, isolate, graph->zone());
const char* debug_name) {
CompilationInfo info(debug_name, isolate, graph->zone());
info.set_output_code_kind(kind);
// Construct a pipeline for scheduling and code generation.
......@@ -1220,7 +1220,7 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
base::SmartPointer<PipelineStatistics> pipeline_statistics;
if (FLAG_turbo_stats) {
pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool));
pipeline_statistics->BeginPhaseKind("interpreter handler codegen");
pipeline_statistics->BeginPhaseKind("stub codegen");
}
Pipeline pipeline(&info);
......
......@@ -36,7 +36,7 @@ class Pipeline {
CallDescriptor* call_descriptor,
Graph* graph, Schedule* schedule,
Code::Kind kind,
const char* bytecode_name);
const char* debug_name);
// Run the pipeline on a machine graph and generate code. If {schedule} is
// {nullptr}, then compute a new schedule for code generation.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment