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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 | 728 |
729 | 729 |
730 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { | 730 void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const { |
731 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); | 731 f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_)); |
732 Definition::PrintOperandsTo(f); | 732 Definition::PrintOperandsTo(f); |
733 } | 733 } |
734 | 734 |
735 | 735 |
736 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { | 736 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { |
737 const GrowableArray<Definition*>& defns = initial_definitions_; | 737 const GrowableArray<Definition*>& defns = initial_definitions_; |
738 f->Print("B%"Pd"[graph]", block_id()); | 738 f->Print("B%"Pd"[graph]:%"Pd, block_id(), GetDeoptId()); |
739 if (defns.length() > 0) { | 739 if (defns.length() > 0) { |
740 f->Print(" {"); | 740 f->Print(" {"); |
741 for (intptr_t i = 0; i < defns.length(); ++i) { | 741 for (intptr_t i = 0; i < defns.length(); ++i) { |
742 Definition* def = defns[i]; | 742 Definition* def = defns[i]; |
743 f->Print("\n "); | 743 f->Print("\n "); |
744 def->PrintTo(f); | 744 def->PrintTo(f); |
745 } | 745 } |
746 f->Print("\n}"); | 746 f->Print("\n}"); |
747 } | 747 } |
748 } | 748 } |
749 | 749 |
750 | 750 |
751 void JoinEntryInstr::PrintTo(BufferFormatter* f) const { | 751 void JoinEntryInstr::PrintTo(BufferFormatter* f) const { |
752 f->Print("B%"Pd"[join] pred(", block_id()); | 752 f->Print("B%"Pd"[join]:%"Pd" pred(", block_id(), GetDeoptId()); |
753 for (intptr_t i = 0; i < predecessors_.length(); ++i) { | 753 for (intptr_t i = 0; i < predecessors_.length(); ++i) { |
754 if (i > 0) f->Print(", "); | 754 if (i > 0) f->Print(", "); |
755 f->Print("B%"Pd, predecessors_[i]->block_id()); | 755 f->Print("B%"Pd, predecessors_[i]->block_id()); |
756 } | 756 } |
757 f->Print(")"); | 757 f->Print(")"); |
758 if (phis_ != NULL) { | 758 if (phis_ != NULL) { |
759 f->Print(" {"); | 759 f->Print(" {"); |
760 for (intptr_t i = 0; i < phis_->length(); ++i) { | 760 for (intptr_t i = 0; i < phis_->length(); ++i) { |
761 if ((*phis_)[i] == NULL) continue; | 761 if ((*phis_)[i] == NULL) continue; |
762 f->Print("\n "); | 762 f->Print("\n "); |
(...skipping 30 matching lines...) Expand all Loading... |
793 } | 793 } |
794 } | 794 } |
795 | 795 |
796 | 796 |
797 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const { | 797 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const { |
798 f->Print("%"Pd, index()); | 798 f->Print("%"Pd, index()); |
799 } | 799 } |
800 | 800 |
801 | 801 |
802 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { | 802 void TargetEntryInstr::PrintTo(BufferFormatter* f) const { |
803 f->Print("B%"Pd"[target]", block_id()); | 803 f->Print("B%"Pd"[target]:%"Pd, block_id(), GetDeoptId()); |
804 if (HasParallelMove()) { | 804 if (HasParallelMove()) { |
805 f->Print(" "); | 805 f->Print(" "); |
806 parallel_move()->PrintTo(f); | 806 parallel_move()->PrintTo(f); |
807 } | 807 } |
808 } | 808 } |
809 | 809 |
810 | 810 |
811 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { | 811 void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const { |
812 f->Print("B%"Pd"[target catch %"Pd"]", block_id(), catch_try_index()); | 812 f->Print("B%"Pd"[target catch %"Pd"]", block_id(), catch_try_index()); |
813 if (HasParallelMove()) { | 813 if (HasParallelMove()) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 f->Print(" ["); | 871 f->Print(" ["); |
872 locations_[i].PrintTo(f); | 872 locations_[i].PrintTo(f); |
873 f->Print("]"); | 873 f->Print("]"); |
874 } | 874 } |
875 } | 875 } |
876 f->Print(" }"); | 876 f->Print(" }"); |
877 if (outer_ != NULL) outer_->PrintTo(f); | 877 if (outer_ != NULL) outer_->PrintTo(f); |
878 } | 878 } |
879 | 879 |
880 } // namespace dart | 880 } // namespace dart |
OLD | NEW |