| 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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 | 1200 |
| 1201 return ScheduleAndGenerateCode( | 1201 return ScheduleAndGenerateCode( |
| 1202 Linkage::ComputeIncoming(data.instruction_zone(), info())); | 1202 Linkage::ComputeIncoming(data.instruction_zone(), info())); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 | 1205 |
| 1206 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, | 1206 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, |
| 1207 CallDescriptor* call_descriptor, | 1207 CallDescriptor* call_descriptor, |
| 1208 Graph* graph, Schedule* schedule, | 1208 Graph* graph, Schedule* schedule, |
| 1209 Code::Kind kind, | 1209 Code::Kind kind, |
| 1210 const char* code_stub_name) { | 1210 const char* debug_name) { |
| 1211 CompilationInfo info(code_stub_name, isolate, graph->zone()); | 1211 CompilationInfo info(debug_name, isolate, graph->zone()); |
| 1212 info.set_output_code_kind(kind); | 1212 info.set_output_code_kind(kind); |
| 1213 | 1213 |
| 1214 // Construct a pipeline for scheduling and code generation. | 1214 // Construct a pipeline for scheduling and code generation. |
| 1215 ZonePool zone_pool; | 1215 ZonePool zone_pool; |
| 1216 PipelineData data(&zone_pool, &info, graph, schedule); | 1216 PipelineData data(&zone_pool, &info, graph, schedule); |
| 1217 base::SmartPointer<PipelineStatistics> pipeline_statistics; | 1217 base::SmartPointer<PipelineStatistics> pipeline_statistics; |
| 1218 if (FLAG_turbo_stats) { | 1218 if (FLAG_turbo_stats) { |
| 1219 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); | 1219 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); |
| 1220 pipeline_statistics->BeginPhaseKind("interpreter handler codegen"); | 1220 pipeline_statistics->BeginPhaseKind("stub codegen"); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 Pipeline pipeline(&info); | 1223 Pipeline pipeline(&info); |
| 1224 pipeline.data_ = &data; | 1224 pipeline.data_ = &data; |
| 1225 DCHECK_NOT_NULL(data.schedule()); | 1225 DCHECK_NOT_NULL(data.schedule()); |
| 1226 | 1226 |
| 1227 if (FLAG_trace_turbo) { | 1227 if (FLAG_trace_turbo) { |
| 1228 FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+"); | 1228 FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+"); |
| 1229 if (json_file != nullptr) { | 1229 if (json_file != nullptr) { |
| 1230 OFStream json_of(json_file); | 1230 OFStream json_of(json_file); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 tcf << AsC1VRegisterAllocationData("CodeGen", | 1472 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1473 data->register_allocation_data()); | 1473 data->register_allocation_data()); |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 data->DeleteRegisterAllocationZone(); | 1476 data->DeleteRegisterAllocationZone(); |
| 1477 } | 1477 } |
| 1478 | 1478 |
| 1479 } // namespace compiler | 1479 } // namespace compiler |
| 1480 } // namespace internal | 1480 } // namespace internal |
| 1481 } // namespace v8 | 1481 } // namespace v8 |
| OLD | NEW |