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 #include "vm/parser.h" | 9 #include "vm/parser.h" |
10 | 10 |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 | 702 |
703 | 703 |
704 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { | 704 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { |
705 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); | 705 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); |
706 Definition::PrintOperandsTo(f); | 706 Definition::PrintOperandsTo(f); |
707 } | 707 } |
708 | 708 |
709 | 709 |
710 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { | 710 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { |
711 const GrowableArray<Definition*>& defns = initial_definitions_; | 711 const GrowableArray<Definition*>& defns = initial_definitions_; |
712 f->Print("B%"Pd"[graph]", block_id()); | 712 f->Print("B%"Pd"[graph]:%"Pd, block_id(), GetDeoptId()); |
713 if (defns.length() > 0) { | 713 if (defns.length() > 0) { |
714 f->Print(" {"); | 714 f->Print(" {"); |
715 for (intptr_t i = 0; i < defns.length(); ++i) { | 715 for (intptr_t i = 0; i < defns.length(); ++i) { |
716 Definition* def = defns[i]; | 716 Definition* def = defns[i]; |
717 f->Print("\n "); | 717 f->Print("\n "); |
718 def->PrintTo(f); | 718 def->PrintTo(f); |
719 } | 719 } |
720 f->Print("\n}"); | 720 f->Print("\n}"); |
721 } | 721 } |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 void JoinEntryInstr::PrintTo(BufferFormatter* f) const { | 725 void JoinEntryInstr::PrintTo(BufferFormatter* f) const { |
726 f->Print("B%"Pd"[join] pred(", block_id()); | 726 f->Print("B%"Pd"[join]:%"Pd" pred(", block_id(), GetDeoptId()); |
727 for (intptr_t i = 0; i < predecessors_.length(); ++i) { | 727 for (intptr_t i = 0; i < predecessors_.length(); ++i) { |
728 if (i > 0) f->Print(", "); | 728 if (i > 0) f->Print(", "); |
729 f->Print("B%"Pd, predecessors_[i]->block_id()); | 729 f->Print("B%"Pd, predecessors_[i]->block_id()); |
730 } | 730 } |
731 f->Print(")"); | 731 f->Print(")"); |
732 if (phis_ != NULL) { | 732 if (phis_ != NULL) { |
733 f->Print(" {"); | 733 f->Print(" {"); |
734 for (intptr_t i = 0; i < phis_->length(); ++i) { | 734 for (intptr_t i = 0; i < phis_->length(); ++i) { |
735 if ((*phis_)[i] == NULL) continue; | 735 if ((*phis_)[i] == NULL) continue; |
736 f->Print("\n "); | 736 f->Print("\n "); |
(...skipping 30 matching lines...) Expand all Loading... |
767 } | 767 } |
768 } | 768 } |
769 | 769 |
770 | 770 |
771 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const { | 771 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const { |
772 f->Print("%"Pd, index()); | 772 f->Print("%"Pd, index()); |
773 } | 773 } |
774 | 774 |
775 | 775 |
776 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { | 776 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { |
777 f->Print("B%"Pd"[target]", block_id()); | 777 f->Print("B%"Pd"[target]:%"Pd, block_id(), GetDeoptId()); |
778 if (HasParallelMove()) { | 778 if (HasParallelMove()) { |
779 f->Print(" "); | 779 f->Print(" "); |
780 parallel_move()->PrintTo(f); | 780 parallel_move()->PrintTo(f); |
781 } | 781 } |
782 } | 782 } |
783 | 783 |
784 | 784 |
785 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { | 785 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { |
786 f->Print("B%"Pd"[target catch %"Pd"]", block_id(), catch_try_index()); | 786 f->Print("B%"Pd"[target catch %"Pd"]", block_id(), catch_try_index()); |
787 if (HasParallelMove()) { | 787 if (HasParallelMove()) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 f->Print(" ["); | 845 f->Print(" ["); |
846 locations_[i].PrintTo(f); | 846 locations_[i].PrintTo(f); |
847 f->Print("]"); | 847 f->Print("]"); |
848 } | 848 } |
849 } | 849 } |
850 f->Print(" }"); | 850 f->Print(" }"); |
851 if (outer_ != NULL) outer_->PrintTo(f); | 851 if (outer_ != NULL) outer_->PrintTo(f); |
852 } | 852 } |
853 | 853 |
854 } // namespace dart | 854 } // namespace dart |
OLD | NEW |