Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: vm/il_printer.cc

Issue 10829141: Support Throw and ReThrow in SSA-based compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "vm/parser.h" 9 #include "vm/parser.h"
10 10
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 473
474 void ReturnInstr::PrintTo(BufferFormatter* f) const { 474 void ReturnInstr::PrintTo(BufferFormatter* f) const {
475 f->Print(" %s:%d ", DebugName(), cid()); 475 f->Print(" %s:%d ", DebugName(), cid());
476 value()->PrintTo(f); 476 value()->PrintTo(f);
477 } 477 }
478 478
479 479
480 void ThrowInstr::PrintTo(BufferFormatter* f) const { 480 void ThrowInstr::PrintTo(BufferFormatter* f) const {
481 f->Print(" %s:%d ", DebugName(), cid()); 481 f->Print(" %s:%d ", DebugName(), cid());
482 exception()->PrintTo(f);
483 } 482 }
484 483
485 484
486 void ReThrowInstr::PrintTo(BufferFormatter* f) const { 485 void ReThrowInstr::PrintTo(BufferFormatter* f) const {
487 f->Print(" %s:%d ", DebugName(), cid()); 486 f->Print(" %s:%d ", DebugName(), cid());
488 exception()->PrintTo(f);
489 f->Print(", ");
490 stack_trace()->PrintTo(f);
491 } 487 }
492 488
493 489
494 void GotoInstr::PrintTo(BufferFormatter* f) const { 490 void GotoInstr::PrintTo(BufferFormatter* f) const {
495 if (HasParallelMove()) { 491 if (HasParallelMove()) {
496 parallel_move()->PrintTo(f); 492 parallel_move()->PrintTo(f);
497 } else { 493 } else {
498 f->Print(" "); 494 f->Print(" ");
499 } 495 }
500 f->Print(" goto %d", successor()->block_id()); 496 f->Print(" goto %d", successor()->block_id());
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 737
742 738
743 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const { 739 void ReturnInstr::PrintToVisualizer(BufferFormatter* f) const {
744 f->Print("_ %s:%d ", DebugName(), cid()); 740 f->Print("_ %s:%d ", DebugName(), cid());
745 value()->PrintTo(f); 741 value()->PrintTo(f);
746 } 742 }
747 743
748 744
749 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const { 745 void ThrowInstr::PrintToVisualizer(BufferFormatter* f) const {
750 f->Print("_ %s:%d ", DebugName(), cid()); 746 f->Print("_ %s:%d ", DebugName(), cid());
751 exception()->PrintTo(f);
752 } 747 }
753 748
754 749
755 void ReThrowInstr::PrintToVisualizer(BufferFormatter* f) const { 750 void ReThrowInstr::PrintToVisualizer(BufferFormatter* f) const {
756 f->Print("_ %s:%d ", DebugName(), cid()); 751 f->Print("_ %s:%d ", DebugName(), cid());
757 exception()->PrintTo(f);
758 f->Print(", ");
759 stack_trace()->PrintTo(f);
760 } 752 }
761 753
762 754
763 void GotoInstr::PrintToVisualizer(BufferFormatter* f) const { 755 void GotoInstr::PrintToVisualizer(BufferFormatter* f) const {
764 f->Print("_ goto B%d", successor()->block_id()); 756 f->Print("_ goto B%d", successor()->block_id());
765 } 757 }
766 758
767 759
768 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const { 760 void BranchInstr::PrintToVisualizer(BufferFormatter* f) const {
769 f->Print("_ %s ", DebugName()); 761 f->Print("_ %s ", DebugName());
(...skipping 20 matching lines...) Expand all
790 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { 782 if ((i < locations_.length()) && !locations_[i].IsInvalid()) {
791 f->Print(" ["); 783 f->Print(" [");
792 locations_[i].PrintTo(f); 784 locations_[i].PrintTo(f);
793 f->Print("]"); 785 f->Print("]");
794 } 786 }
795 } 787 }
796 f->Print(" }"); 788 f->Print(" }");
797 } 789 }
798 790
799 } // namespace dart 791 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698