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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/pipeline.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index b627f25ed6259aecd7ab53a52c7be2fb9197fee0..ffeec468c07285cc36d25be8457901854287c201 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -1129,6 +1129,36 @@ Handle<Code> Pipeline::GenerateCode() {
}
+Handle<Code> Pipeline::GenerateCodeForInterpreter(
+ Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph,
+ Schedule* schedule, const char* bytecode_name) {
+ CompilationInfo info(bytecode_name, isolate, graph->zone());
+
+ // Construct a pipeline for scheduling and code generation.
+ ZonePool zone_pool;
+ PipelineData data(&zone_pool, &info, graph, schedule);
+ base::SmartPointer<PipelineStatistics> pipeline_statistics;
+ if (FLAG_turbo_stats) {
+ pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool));
+ pipeline_statistics->BeginPhaseKind("interpreter handler codegen");
+ }
+ if (FLAG_trace_turbo) {
+ FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+");
+ if (json_file != nullptr) {
+ OFStream json_of(json_file);
+ json_of << "{\"function\":\"" << info.GetDebugName().get()
+ << "\", \"source\":\"\",\n\"phases\":[";
+ fclose(json_file);
+ }
+ }
+
+ Pipeline pipeline(&info);
+ pipeline.data_ = &data;
+ pipeline.RunPrintAndVerify("Machine", true);
+ return pipeline.ScheduleAndGenerateCode(call_descriptor);
+}
+
+
Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info,
Graph* graph,
Schedule* schedule) {
« 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