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

Side by Side Diff: runtime/vm/il_printer.cc

Issue 1268783002: Fix inlining information: (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sync 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 | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/object.h » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/il_printer.h" 5 #include "vm/il_printer.h"
6 6
7 #include "vm/flow_graph_range_analysis.h" 7 #include "vm/flow_graph_range_analysis.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 DEFINE_FLAG(bool, print_environments, false, "Print SSA environments."); 14 DEFINE_FLAG(bool, print_environments, false, "Print SSA environments.");
15 DEFINE_FLAG(charp, print_flow_graph_filter, NULL, 15 DEFINE_FLAG(charp, print_flow_graph_filter, NULL,
16 "Print only IR of functions with matching names"); 16 "Print only IR of functions with matching names");
17 17
18 DECLARE_FLAG(bool, trace_inlining_intervals);
19
18 void BufferFormatter::Print(const char* format, ...) { 20 void BufferFormatter::Print(const char* format, ...) {
19 va_list args; 21 va_list args;
20 va_start(args, format); 22 va_start(args, format);
21 VPrint(format, args); 23 VPrint(format, args);
22 va_end(args); 24 va_end(args);
23 } 25 }
24 26
25 27
26 void BufferFormatter::VPrint(const char* format, va_list args) { 28 void BufferFormatter::VPrint(const char* format, va_list args) {
27 intptr_t available = size_ - position_; 29 intptr_t available = size_ - position_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 instr->env()->PrintTo(&f); 131 instr->env()->PrintTo(&f);
130 } 132 }
131 if (print_locations && (instr->HasLocs())) { 133 if (print_locations && (instr->HasLocs())) {
132 instr->locs()->PrintTo(&f); 134 instr->locs()->PrintTo(&f);
133 } 135 }
134 if (instr->lifetime_position() != -1) { 136 if (instr->lifetime_position() != -1) {
135 ISL_Print("%3" Pd ": ", instr->lifetime_position()); 137 ISL_Print("%3" Pd ": ", instr->lifetime_position());
136 } 138 }
137 if (!instr->IsBlockEntry()) ISL_Print(" "); 139 if (!instr->IsBlockEntry()) ISL_Print(" ");
138 ISL_Print("%s", str); 140 ISL_Print("%s", str);
141 if (FLAG_trace_inlining_intervals) {
142 ISL_Print(" iid: %"Pd"", instr->inlining_id());
143 }
139 } 144 }
140 145
141 146
142 void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function, 147 void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function,
143 intptr_t token_pos, 148 intptr_t token_pos,
144 Value* value, 149 Value* value,
145 const AbstractType& dst_type, 150 const AbstractType& dst_type,
146 const String& dst_name, 151 const String& dst_name,
147 bool eliminated) { 152 bool eliminated) {
148 const char* compile_type_name = "unknown"; 153 const char* compile_type_name = "unknown";
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 } 1212 }
1208 1213
1209 const char* Environment::ToCString() const { 1214 const char* Environment::ToCString() const {
1210 char buffer[1024]; 1215 char buffer[1024];
1211 BufferFormatter bf(buffer, 1024); 1216 BufferFormatter bf(buffer, 1024);
1212 PrintTo(&bf); 1217 PrintTo(&bf);
1213 return Thread::Current()->zone()->MakeCopyOfString(buffer); 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer);
1214 } 1219 }
1215 1220
1216 } // namespace dart 1221 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698