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/intermediate_language.h" | 7 #include "vm/intermediate_language.h" |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 f->Print(" goto (%d, %d)", | 453 f->Print(" goto (%d, %d)", |
454 true_successor()->block_id(), | 454 true_successor()->block_id(), |
455 false_successor()->block_id()); | 455 false_successor()->block_id()); |
456 } | 456 } |
457 | 457 |
458 | 458 |
459 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { | 459 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { |
460 f->Print(" %s ", DebugName()); | 460 f->Print(" %s ", DebugName()); |
461 for (intptr_t i = 0; i < moves_.length(); i++) { | 461 for (intptr_t i = 0; i < moves_.length(); i++) { |
462 if (i != 0) f->Print(", "); | 462 if (i != 0) f->Print(", "); |
463 f->Print("%s = %s", moves_[i].dest().Name(), moves_[i].src().Name()); | 463 moves_[i].dest().PrintTo(f); |
| 464 f->Print(" = "); |
| 465 moves_[i].src().PrintTo(f); |
464 } | 466 } |
465 } | 467 } |
466 | 468 |
467 | 469 |
468 void FlowGraphVisualizer::Print(const char* format, ...) { | 470 void FlowGraphVisualizer::Print(const char* format, ...) { |
469 char str[1000]; | 471 char str[1000]; |
470 BufferFormatter f(str, sizeof(str)); | 472 BufferFormatter f(str, sizeof(str)); |
471 f.Print("%*s", 2 * indent_, ""); | 473 f.Print("%*s", 2 * indent_, ""); |
472 va_list args; | 474 va_list args; |
473 va_start(args, format); | 475 va_start(args, format); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 UNIMPLEMENTED(); | 707 UNIMPLEMENTED(); |
706 } | 708 } |
707 | 709 |
708 | 710 |
709 void Environment::PrintTo(BufferFormatter* f) const { | 711 void Environment::PrintTo(BufferFormatter* f) const { |
710 f->Print(" env={ "); | 712 f->Print(" env={ "); |
711 for (intptr_t i = 0; i < values_.length(); ++i) { | 713 for (intptr_t i = 0; i < values_.length(); ++i) { |
712 if (i > 0) f->Print(", "); | 714 if (i > 0) f->Print(", "); |
713 values_[i]->PrintTo(f); | 715 values_[i]->PrintTo(f); |
714 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { | 716 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { |
715 f->Print(" [%s]", locations_[i].Name()); | 717 f->Print(" ["); |
| 718 locations_[i].PrintTo(f); |
| 719 f->Print("]"); |
716 } | 720 } |
717 } | 721 } |
718 f->Print(" }"); | 722 f->Print(" }"); |
719 } | 723 } |
720 | 724 |
721 } // namespace dart | 725 } // namespace dart |
OLD | NEW |