Chromium Code Reviews| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 460 if (HasICData()) { | 460 if (HasICData()) { |
| 461 PrintICData(f, *ic_data()); | 461 PrintICData(f, *ic_data()); |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 | 464 |
| 465 | 465 |
| 466 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { | 466 void ParallelMoveInstr::PrintTo(BufferFormatter* f) const { |
| 467 f->Print(" %s ", DebugName()); | 467 f->Print(" %s ", DebugName()); |
| 468 for (intptr_t i = 0; i < moves_.length(); i++) { | 468 for (intptr_t i = 0; i < moves_.length(); i++) { |
| 469 if (i != 0) f->Print(", "); | 469 if (i != 0) f->Print(", "); |
| 470 f->Print("%s = %s", moves_[i]->dest().Name(), moves_[i]->src().Name()); | 470 moves_[i]->dest().PrintTo(f); |
| 471 f->Print(" = "); | |
|
Kevin Millikin (Google)
2012/07/23 12:52:30
I like something that emphasizes the direction of
Vyacheslav Egorov (Google)
2012/07/23 14:06:10
Done.
| |
| 472 moves_[i]->src().PrintTo(f); | |
| 471 } | 473 } |
| 472 } | 474 } |
| 473 | 475 |
| 474 | 476 |
| 475 void FlowGraphVisualizer::Print(const char* format, ...) { | 477 void FlowGraphVisualizer::Print(const char* format, ...) { |
| 476 char str[1000]; | 478 char str[1000]; |
| 477 BufferFormatter f(str, sizeof(str)); | 479 BufferFormatter f(str, sizeof(str)); |
| 478 f.Print("%*s", 2 * indent_, ""); | 480 f.Print("%*s", 2 * indent_, ""); |
| 479 va_list args; | 481 va_list args; |
| 480 va_start(args, format); | 482 va_start(args, format); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 719 UNIMPLEMENTED(); | 721 UNIMPLEMENTED(); |
| 720 } | 722 } |
| 721 | 723 |
| 722 | 724 |
| 723 void Environment::PrintTo(BufferFormatter* f) const { | 725 void Environment::PrintTo(BufferFormatter* f) const { |
| 724 f->Print(" env={ "); | 726 f->Print(" env={ "); |
| 725 for (intptr_t i = 0; i < values_.length(); ++i) { | 727 for (intptr_t i = 0; i < values_.length(); ++i) { |
| 726 if (i > 0) f->Print(", "); | 728 if (i > 0) f->Print(", "); |
| 727 values_[i]->PrintTo(f); | 729 values_[i]->PrintTo(f); |
| 728 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { | 730 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { |
| 729 f->Print(" [%s]", locations_[i].Name()); | 731 f->Print(" ["); |
| 732 locations_[i].PrintTo(f); | |
| 733 f->Print("]"); | |
| 730 } | 734 } |
| 731 } | 735 } |
| 732 f->Print(" }"); | 736 f->Print(" }"); |
| 733 } | 737 } |
| 734 | 738 |
| 735 } // namespace dart | 739 } // namespace dart |
| OLD | NEW |