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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 xy()->PrintTo(f); | 618 xy()->PrintTo(f); |
619 f->Print(", "); | 619 f->Print(", "); |
620 zw()->PrintTo(f); | 620 zw()->PrintTo(f); |
621 } | 621 } |
622 | 622 |
623 | 623 |
624 void Simd32x4GetSignMaskInstr::PrintOperandsTo(BufferFormatter* f) const { | 624 void Simd32x4GetSignMaskInstr::PrintOperandsTo(BufferFormatter* f) const { |
625 if (op_kind() == MethodRecognizer::kFloat32x4GetSignMask) { | 625 if (op_kind() == MethodRecognizer::kFloat32x4GetSignMask) { |
626 f->Print("Float32x4.getSignMask "); | 626 f->Print("Float32x4.getSignMask "); |
627 } else { | 627 } else { |
628 ASSERT(op_kind() == MethodRecognizer::kUint32x4GetSignMask); | 628 ASSERT(op_kind() == MethodRecognizer::kInt32x4GetSignMask); |
629 f->Print("Uint32x4.getSignMask "); | 629 f->Print("Int32x4.getSignMask "); |
630 } | 630 } |
631 value()->PrintTo(f); | 631 value()->PrintTo(f); |
632 } | 632 } |
633 | 633 |
634 | 634 |
635 void Float32x4ZeroInstr::PrintOperandsTo(BufferFormatter* f) const { | 635 void Float32x4ZeroInstr::PrintOperandsTo(BufferFormatter* f) const { |
636 f->Print("ZERO "); | 636 f->Print("ZERO "); |
637 } | 637 } |
638 | 638 |
639 | 639 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 700 |
701 | 701 |
702 void Float32x4WithInstr::PrintOperandsTo(BufferFormatter* f) const { | 702 void Float32x4WithInstr::PrintOperandsTo(BufferFormatter* f) const { |
703 f->Print("%s, ", MethodRecognizer::KindToCString(op_kind())); | 703 f->Print("%s, ", MethodRecognizer::KindToCString(op_kind())); |
704 left()->PrintTo(f); | 704 left()->PrintTo(f); |
705 f->Print(", "); | 705 f->Print(", "); |
706 replacement()->PrintTo(f); | 706 replacement()->PrintTo(f); |
707 } | 707 } |
708 | 708 |
709 | 709 |
710 void Float32x4ToUint32x4Instr::PrintOperandsTo(BufferFormatter* f) const { | 710 void Float32x4ToInt32x4Instr::PrintOperandsTo(BufferFormatter* f) const { |
711 f->Print("Float32x4.toUint32x4 "); | 711 f->Print("Float32x4.toInt32x4 "); |
712 left()->PrintTo(f); | 712 left()->PrintTo(f); |
713 } | 713 } |
714 | 714 |
715 | 715 |
716 | 716 |
717 | 717 |
718 | 718 |
719 void Uint32x4BoolConstructorInstr::PrintOperandsTo(BufferFormatter* f) const { | 719 void Int32x4BoolConstructorInstr::PrintOperandsTo(BufferFormatter* f) const { |
720 f->Print("Uint32x4.bool("); | 720 f->Print("Int32x4.bool("); |
721 value0()->PrintTo(f); | 721 value0()->PrintTo(f); |
722 f->Print(", "); | 722 f->Print(", "); |
723 value1()->PrintTo(f); | 723 value1()->PrintTo(f); |
724 f->Print(", "); | 724 f->Print(", "); |
725 value2()->PrintTo(f); | 725 value2()->PrintTo(f); |
726 f->Print(", "); | 726 f->Print(", "); |
727 value3()->PrintTo(f); | 727 value3()->PrintTo(f); |
728 f->Print(")"); | 728 f->Print(")"); |
729 } | 729 } |
730 | 730 |
731 | 731 |
732 void Uint32x4GetFlagInstr::PrintOperandsTo(BufferFormatter* f) const { | 732 void Int32x4GetFlagInstr::PrintOperandsTo(BufferFormatter* f) const { |
733 f->Print("Uint32x4.%s ", MethodRecognizer::KindToCString(op_kind())); | 733 f->Print("Int32x4.%s ", MethodRecognizer::KindToCString(op_kind())); |
734 value()->PrintTo(f); | 734 value()->PrintTo(f); |
735 } | 735 } |
736 | 736 |
737 | 737 |
738 void Uint32x4SetFlagInstr::PrintOperandsTo(BufferFormatter* f) const { | 738 void Int32x4SetFlagInstr::PrintOperandsTo(BufferFormatter* f) const { |
739 f->Print("Uint32x4.%s ", MethodRecognizer::KindToCString(op_kind())); | 739 f->Print("Int32x4.%s ", MethodRecognizer::KindToCString(op_kind())); |
740 value()->PrintTo(f); | 740 value()->PrintTo(f); |
741 f->Print(", "); | 741 f->Print(", "); |
742 flagValue()->PrintTo(f); | 742 flagValue()->PrintTo(f); |
743 } | 743 } |
744 | 744 |
745 | 745 |
746 void Uint32x4SelectInstr::PrintOperandsTo(BufferFormatter* f) const { | 746 void Int32x4SelectInstr::PrintOperandsTo(BufferFormatter* f) const { |
747 f->Print("Uint32x4.select "); | 747 f->Print("Int32x4.select "); |
748 mask()->PrintTo(f); | 748 mask()->PrintTo(f); |
749 f->Print(", "); | 749 f->Print(", "); |
750 trueValue()->PrintTo(f); | 750 trueValue()->PrintTo(f); |
751 f->Print(", "); | 751 f->Print(", "); |
752 falseValue()->PrintTo(f); | 752 falseValue()->PrintTo(f); |
753 } | 753 } |
754 | 754 |
755 | 755 |
756 void Uint32x4ToFloat32x4Instr::PrintOperandsTo(BufferFormatter* f) const { | 756 void Int32x4ToFloat32x4Instr::PrintOperandsTo(BufferFormatter* f) const { |
757 f->Print("Uint32x4.toFloat32x4 "); | 757 f->Print("Int32x4.toFloat32x4 "); |
758 left()->PrintTo(f); | 758 left()->PrintTo(f); |
759 } | 759 } |
760 | 760 |
761 | 761 |
762 void BinaryUint32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const { | 762 void BinaryInt32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const { |
763 f->Print("%s, ", Token::Str(op_kind())); | 763 f->Print("%s, ", Token::Str(op_kind())); |
764 left()->PrintTo(f); | 764 left()->PrintTo(f); |
765 f->Print(", "); | 765 f->Print(", "); |
766 right()->PrintTo(f); | 766 right()->PrintTo(f); |
767 } | 767 } |
768 | 768 |
769 | 769 |
770 void BinaryMintOpInstr::PrintOperandsTo(BufferFormatter* f) const { | 770 void BinaryMintOpInstr::PrintOperandsTo(BufferFormatter* f) const { |
771 f->Print("%s, ", Token::Str(op_kind())); | 771 f->Print("%s, ", Token::Str(op_kind())); |
772 left()->PrintTo(f); | 772 left()->PrintTo(f); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 f->Print(" ["); | 981 f->Print(" ["); |
982 locations_[i].PrintTo(f); | 982 locations_[i].PrintTo(f); |
983 f->Print("]"); | 983 f->Print("]"); |
984 } | 984 } |
985 } | 985 } |
986 f->Print(" }"); | 986 f->Print(" }"); |
987 if (outer_ != NULL) outer_->PrintTo(f); | 987 if (outer_ != NULL) outer_->PrintTo(f); |
988 } | 988 } |
989 | 989 |
990 } // namespace dart | 990 } // namespace dart |
OLD | NEW |