Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: src/compiler/pipeline.cc

Issue 1308863004: [interpreter] Allow verification and trace-turbo for bytecode handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ignition-visualize
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/pipeline.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 data.source_positions()->RemoveDecorator(); 1122 data.source_positions()->RemoveDecorator();
1123 1123
1124 // Kill the Typer and thereby uninstall the decorator (if any). 1124 // Kill the Typer and thereby uninstall the decorator (if any).
1125 typer.Reset(nullptr); 1125 typer.Reset(nullptr);
1126 1126
1127 return ScheduleAndGenerateCode( 1127 return ScheduleAndGenerateCode(
1128 Linkage::ComputeIncoming(data.instruction_zone(), info())); 1128 Linkage::ComputeIncoming(data.instruction_zone(), info()));
1129 } 1129 }
1130 1130
1131 1131
1132 Handle<Code> Pipeline::GenerateCodeForInterpreter(
1133 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph,
1134 Schedule* schedule, const char* bytecode_name) {
1135 CompilationInfo info(bytecode_name, isolate, graph->zone());
1136
1137 // Construct a pipeline for scheduling and code generation.
1138 ZonePool zone_pool;
1139 PipelineData data(&zone_pool, &info, graph, schedule);
1140 base::SmartPointer<PipelineStatistics> pipeline_statistics;
1141 if (FLAG_turbo_stats) {
1142 pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool));
1143 pipeline_statistics->BeginPhaseKind("interpreter handler codegen");
1144 }
1145 if (FLAG_trace_turbo) {
1146 FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+");
1147 if (json_file != nullptr) {
1148 OFStream json_of(json_file);
1149 json_of << "{\"function\":\"" << info.GetDebugName().get()
1150 << "\", \"source\":\"\",\n\"phases\":[";
1151 fclose(json_file);
1152 }
1153 }
1154
1155 Pipeline pipeline(&info);
1156 pipeline.data_ = &data;
1157 pipeline.RunPrintAndVerify("Machine", true);
1158 return pipeline.ScheduleAndGenerateCode(call_descriptor);
1159 }
1160
1161
1132 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, 1162 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info,
1133 Graph* graph, 1163 Graph* graph,
1134 Schedule* schedule) { 1164 Schedule* schedule) {
1135 CallDescriptor* call_descriptor = 1165 CallDescriptor* call_descriptor =
1136 Linkage::ComputeIncoming(info->zone(), info); 1166 Linkage::ComputeIncoming(info->zone(), info);
1137 return GenerateCodeForTesting(info, call_descriptor, graph, schedule); 1167 return GenerateCodeForTesting(info, call_descriptor, graph, schedule);
1138 } 1168 }
1139 1169
1140 1170
1141 Handle<Code> Pipeline::GenerateCodeForTesting(Isolate* isolate, 1171 Handle<Code> Pipeline::GenerateCodeForTesting(Isolate* isolate,
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 tcf << AsC1VRegisterAllocationData("CodeGen", 1390 tcf << AsC1VRegisterAllocationData("CodeGen",
1361 data->register_allocation_data()); 1391 data->register_allocation_data());
1362 } 1392 }
1363 1393
1364 data->DeleteRegisterAllocationZone(); 1394 data->DeleteRegisterAllocationZone();
1365 } 1395 }
1366 1396
1367 } // namespace compiler 1397 } // namespace compiler
1368 } // namespace internal 1398 } // namespace internal
1369 } // namespace v8 1399 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698