OLD | NEW |
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 #ifndef PRODUCT |
| 15 |
14 DEFINE_FLAG(bool, print_environments, false, "Print SSA environments."); | 16 DEFINE_FLAG(bool, print_environments, false, "Print SSA environments."); |
15 DEFINE_FLAG(charp, print_flow_graph_filter, NULL, | 17 DEFINE_FLAG(charp, print_flow_graph_filter, NULL, |
16 "Print only IR of functions with matching names"); | 18 "Print only IR of functions with matching names"); |
17 | 19 |
18 DECLARE_FLAG(bool, trace_inlining_intervals); | 20 DECLARE_FLAG(bool, trace_inlining_intervals); |
19 | 21 |
20 void BufferFormatter::Print(const char* format, ...) { | 22 void BufferFormatter::Print(const char* format, ...) { |
21 va_list args; | 23 va_list args; |
22 va_start(args, format); | 24 va_start(args, format); |
23 VPrint(format, args); | 25 VPrint(format, args); |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 if (outer_ != NULL) outer_->PrintTo(f); | 1212 if (outer_ != NULL) outer_->PrintTo(f); |
1211 } | 1213 } |
1212 | 1214 |
1213 const char* Environment::ToCString() const { | 1215 const char* Environment::ToCString() const { |
1214 char buffer[1024]; | 1216 char buffer[1024]; |
1215 BufferFormatter bf(buffer, 1024); | 1217 BufferFormatter bf(buffer, 1024); |
1216 PrintTo(&bf); | 1218 PrintTo(&bf); |
1217 return Thread::Current()->zone()->MakeCopyOfString(buffer); | 1219 return Thread::Current()->zone()->MakeCopyOfString(buffer); |
1218 } | 1220 } |
1219 | 1221 |
| 1222 #else // PRODUCT |
| 1223 |
| 1224 void FlowGraphPrinter::PrintOneInstruction(Instruction* instr, |
| 1225 bool print_locations) { |
| 1226 UNREACHABLE(); |
| 1227 } |
| 1228 |
| 1229 |
| 1230 void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function, |
| 1231 TokenPosition token_pos, |
| 1232 Value* value, |
| 1233 const AbstractType& dst_type, |
| 1234 const String& dst_name, |
| 1235 bool eliminated) { |
| 1236 UNREACHABLE(); |
| 1237 } |
| 1238 |
| 1239 |
| 1240 void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block, |
| 1241 bool print_locations) { |
| 1242 UNREACHABLE(); |
| 1243 } |
| 1244 |
| 1245 |
| 1246 void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) { |
| 1247 UNREACHABLE(); |
| 1248 } |
| 1249 |
| 1250 |
| 1251 void FlowGraphPrinter::PrintICData(const ICData& ic_data) { |
| 1252 UNREACHABLE(); |
| 1253 } |
| 1254 |
| 1255 |
| 1256 bool FlowGraphPrinter::ShouldPrint(const Function& function) { |
| 1257 return false; |
| 1258 } |
| 1259 |
| 1260 #endif // !PRODUCT |
| 1261 |
1220 } // namespace dart | 1262 } // namespace dart |
OLD | NEW |