OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 data.source_positions()->RemoveDecorator(); | 1181 data.source_positions()->RemoveDecorator(); |
1182 | 1182 |
1183 // Kill the Typer and thereby uninstall the decorator (if any). | 1183 // Kill the Typer and thereby uninstall the decorator (if any). |
1184 typer.Reset(nullptr); | 1184 typer.Reset(nullptr); |
1185 | 1185 |
1186 return ScheduleAndGenerateCode( | 1186 return ScheduleAndGenerateCode( |
1187 Linkage::ComputeIncoming(data.instruction_zone(), info())); | 1187 Linkage::ComputeIncoming(data.instruction_zone(), info())); |
1188 } | 1188 } |
1189 | 1189 |
1190 | 1190 |
1191 Handle<Code> Pipeline::GenerateCodeForInterpreter( | 1191 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, |
1192 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, | 1192 CallDescriptor* call_descriptor, |
1193 Schedule* schedule, const char* bytecode_name) { | 1193 Graph* graph, Schedule* schedule, |
1194 CompilationInfo info(bytecode_name, isolate, graph->zone()); | 1194 Code::Kind kind, |
| 1195 const char* code_stub_name) { |
| 1196 CompilationInfo info(code_stub_name, isolate, graph->zone()); |
| 1197 info.set_output_code_kind(kind); |
1195 | 1198 |
1196 // Construct a pipeline for scheduling and code generation. | 1199 // Construct a pipeline for scheduling and code generation. |
1197 ZonePool zone_pool; | 1200 ZonePool zone_pool; |
1198 PipelineData data(&zone_pool, &info, graph, schedule); | 1201 PipelineData data(&zone_pool, &info, graph, schedule); |
1199 base::SmartPointer<PipelineStatistics> pipeline_statistics; | 1202 base::SmartPointer<PipelineStatistics> pipeline_statistics; |
1200 if (FLAG_turbo_stats) { | 1203 if (FLAG_turbo_stats) { |
1201 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); | 1204 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); |
1202 pipeline_statistics->BeginPhaseKind("interpreter handler codegen"); | 1205 pipeline_statistics->BeginPhaseKind("interpreter handler codegen"); |
1203 } | 1206 } |
1204 if (FLAG_trace_turbo) { | 1207 if (FLAG_trace_turbo) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 tcf << AsC1VRegisterAllocationData("CodeGen", | 1454 tcf << AsC1VRegisterAllocationData("CodeGen", |
1452 data->register_allocation_data()); | 1455 data->register_allocation_data()); |
1453 } | 1456 } |
1454 | 1457 |
1455 data->DeleteRegisterAllocationZone(); | 1458 data->DeleteRegisterAllocationZone(); |
1456 } | 1459 } |
1457 | 1460 |
1458 } // namespace compiler | 1461 } // namespace compiler |
1459 } // namespace internal | 1462 } // namespace internal |
1460 } // namespace v8 | 1463 } // namespace v8 |
OLD | NEW |