| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { | 360 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { |
| 361 f->Print("%2d: [target", block_id()); | 361 f->Print("%2d: [target", block_id()); |
| 362 if (HasTryIndex()) { | 362 if (HasTryIndex()) { |
| 363 f->Print(" catch %d]", try_index()); | 363 f->Print(" catch %d]", try_index()); |
| 364 } else { | 364 } else { |
| 365 f->Print("]"); | 365 f->Print("]"); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 | 369 |
| 370 void DoInstr::PrintTo(BufferFormatter* f) const { | |
| 371 f->Print(" "); | |
| 372 computation()->PrintTo(f); | |
| 373 } | |
| 374 | |
| 375 | |
| 376 void BindInstr::PrintTo(BufferFormatter* f) const { | 370 void BindInstr::PrintTo(BufferFormatter* f) const { |
| 377 if (ssa_temp_index() != -1) { | 371 if (!is_used()) { |
| 372 f->Print(" "); |
| 373 } else if (ssa_temp_index() != -1) { |
| 378 f->Print(" v%d <- ", ssa_temp_index()); | 374 f->Print(" v%d <- ", ssa_temp_index()); |
| 379 } else { | 375 } else { |
| 380 f->Print(" t%d <- ", temp_index()); | 376 f->Print(" t%d <- ", temp_index()); |
| 381 } | 377 } |
| 382 computation()->PrintTo(f); | 378 computation()->PrintTo(f); |
| 383 } | 379 } |
| 384 | 380 |
| 385 | 381 |
| 386 void ReturnInstr::PrintTo(BufferFormatter* f) const { | 382 void ReturnInstr::PrintTo(BufferFormatter* f) const { |
| 387 f->Print(" %s ", DebugName()); | 383 f->Print(" %s ", DebugName()); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 void TargetEntryInstr::PrintToVisualizer(BufferFormatter* f) const { | 607 void TargetEntryInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 612 f->Print("_ [target"); | 608 f->Print("_ [target"); |
| 613 if (HasTryIndex()) { | 609 if (HasTryIndex()) { |
| 614 f->Print(" catch %d]", try_index()); | 610 f->Print(" catch %d]", try_index()); |
| 615 } else { | 611 } else { |
| 616 f->Print("]"); | 612 f->Print("]"); |
| 617 } | 613 } |
| 618 } | 614 } |
| 619 | 615 |
| 620 | 616 |
| 621 void DoInstr::PrintToVisualizer(BufferFormatter* f) const { | |
| 622 f->Print("_ "); | |
| 623 computation()->PrintTo(f); | |
| 624 } | |
| 625 | |
| 626 | |
| 627 void BindInstr::PrintToVisualizer(BufferFormatter* f) const { | 617 void BindInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 628 if (ssa_temp_index() != -1) { | 618 if (!is_used()) { |
| 619 f->Print("_ "); |
| 620 } else if (ssa_temp_index() != -1) { |
| 629 f->Print("v%d ", ssa_temp_index()); | 621 f->Print("v%d ", ssa_temp_index()); |
| 630 } else { | 622 } else { |
| 631 f->Print("t%d ", temp_index()); | 623 f->Print("t%d ", temp_index()); |
| 632 } | 624 } |
| 633 computation()->PrintTo(f); | 625 computation()->PrintTo(f); |
| 634 } | 626 } |
| 635 | 627 |
| 636 | 628 |
| 637 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { | 629 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { |
| 638 f->Print("_ %s ", DebugName()); | 630 f->Print("_ %s ", DebugName()); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 void Environment::PrintTo(BufferFormatter* f) const { | 664 void Environment::PrintTo(BufferFormatter* f) const { |
| 673 f->Print(" env={ "); | 665 f->Print(" env={ "); |
| 674 for (intptr_t i = 0; i < values_.length(); ++i) { | 666 for (intptr_t i = 0; i < values_.length(); ++i) { |
| 675 if (i > 0) f->Print(", "); | 667 if (i > 0) f->Print(", "); |
| 676 values_[i]->PrintTo(f); | 668 values_[i]->PrintTo(f); |
| 677 } | 669 } |
| 678 f->Print(" }"); | 670 f->Print(" }"); |
| 679 } | 671 } |
| 680 | 672 |
| 681 } // namespace dart | 673 } // namespace dart |
| OLD | NEW |