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

Side by Side Diff: runtime/vm/il_printer.cc

Issue 12600012: Add a new, separate block entry instruction for catch-blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed IL printer Created 7 years, 9 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } 642 }
643 } 643 }
644 644
645 645
646 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const { 646 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
647 f->Print("%"Pd, index()); 647 f->Print("%"Pd, index());
648 } 648 }
649 649
650 650
651 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { 651 void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
652 f->Print("B%"Pd"[target", block_id()); 652 f->Print("B%"Pd"[target]", block_id());
653 if (IsCatchEntry()) {
654 f->Print(" catch %"Pd"]", catch_try_index());
655 } else {
656 f->Print("]");
657 }
658 if (HasParallelMove()) { 653 if (HasParallelMove()) {
659 f->Print(" "); 654 f->Print(" ");
660 parallel_move()->PrintTo(f); 655 parallel_move()->PrintTo(f);
656 }
657 }
658
659
660 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const {
661 f->Print("B%"Pd"[target catch %"Pd"]", block_id(), catch_try_index());
662 if (HasParallelMove()) {
663 f->Print(" ");
664 parallel_move()->PrintTo(f);
661 } 665 }
662 } 666 }
663 667
664 668
665 void PushArgumentInstr::PrintOperandsTo(BufferFormatter* f) const { 669 void PushArgumentInstr::PrintOperandsTo(BufferFormatter* f) const {
666 value()->PrintTo(f); 670 value()->PrintTo(f);
667 } 671 }
668 672
669 673
670 void GotoInstr::PrintTo(BufferFormatter* f) const { 674 void GotoInstr::PrintTo(BufferFormatter* f) const {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 f->Print(" ["); 716 f->Print(" [");
713 locations_[i].PrintTo(f); 717 locations_[i].PrintTo(f);
714 f->Print("]"); 718 f->Print("]");
715 } 719 }
716 } 720 }
717 f->Print(" }"); 721 f->Print(" }");
718 if (outer_ != NULL) outer_->PrintTo(f); 722 if (outer_ != NULL) outer_->PrintTo(f);
719 } 723 }
720 724
721 } // namespace dart 725 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698