| 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" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return found; | 76 return found; |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 bool FlowGraphPrinter::ShouldPrint(const Function& function) { | 80 bool FlowGraphPrinter::ShouldPrint(const Function& function) { |
| 81 return PassesFilter(FLAG_print_flow_graph_filter, function); | 81 return PassesFilter(FLAG_print_flow_graph_filter, function); |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) { | 85 void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) { |
| 86 LogBlock lb(Isolate::Current()); | 86 LogBlock lb(Thread::Current()); |
| 87 ISL_Print("*** BEGIN CFG\n%s\n", phase); | 87 ISL_Print("*** BEGIN CFG\n%s\n", phase); |
| 88 FlowGraphPrinter printer(*flow_graph); | 88 FlowGraphPrinter printer(*flow_graph); |
| 89 printer.PrintBlocks(); | 89 printer.PrintBlocks(); |
| 90 ISL_Print("*** END CFG\n"); | 90 ISL_Print("*** END CFG\n"); |
| 91 fflush(stdout); | 91 fflush(stdout); |
| 92 } | 92 } |
| 93 | 93 |
| 94 | 94 |
| 95 void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block, | 95 void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block, |
| 96 bool print_locations) { | 96 bool print_locations) { |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 const char* Environment::ToCString() const { | 1214 const char* Environment::ToCString() const { |
| 1215 char buffer[1024]; | 1215 char buffer[1024]; |
| 1216 BufferFormatter bf(buffer, 1024); | 1216 BufferFormatter bf(buffer, 1024); |
| 1217 PrintTo(&bf); | 1217 PrintTo(&bf); |
| 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); | 1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 } // namespace dart | 1221 } // namespace dart |
| OLD | NEW |