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

Side by Side Diff: src/x64/lithium-x64.h

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 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 | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 V(CompareNumericAndBranch) \ 73 V(CompareNumericAndBranch) \
74 V(CmpObjectEqAndBranch) \ 74 V(CmpObjectEqAndBranch) \
75 V(CmpHoleAndBranch) \ 75 V(CmpHoleAndBranch) \
76 V(CmpMapAndBranch) \ 76 V(CmpMapAndBranch) \
77 V(CmpT) \ 77 V(CmpT) \
78 V(ConstantD) \ 78 V(ConstantD) \
79 V(ConstantE) \ 79 V(ConstantE) \
80 V(ConstantI) \ 80 V(ConstantI) \
81 V(ConstantS) \ 81 V(ConstantS) \
82 V(ConstantT) \ 82 V(ConstantT) \
83 V(ConstructDouble) \
83 V(Context) \ 84 V(Context) \
84 V(DateField) \ 85 V(DateField) \
85 V(DebugBreak) \ 86 V(DebugBreak) \
86 V(DeclareGlobals) \ 87 V(DeclareGlobals) \
87 V(Deoptimize) \ 88 V(Deoptimize) \
89 V(DivByConstI) \
90 V(DivByPowerOf2I) \
88 V(DivI) \ 91 V(DivI) \
92 V(DoubleBits) \
89 V(DoubleToI) \ 93 V(DoubleToI) \
90 V(DoubleToSmi) \ 94 V(DoubleToSmi) \
91 V(Drop) \ 95 V(Drop) \
92 V(DummyUse) \ 96 V(DummyUse) \
93 V(Dummy) \ 97 V(Dummy) \
98 V(FlooringDivByConstI) \
99 V(FlooringDivByPowerOf2I) \
94 V(ForInCacheArray) \ 100 V(ForInCacheArray) \
95 V(ForInPrepareMap) \ 101 V(ForInPrepareMap) \
96 V(FunctionLiteral) \ 102 V(FunctionLiteral) \
97 V(GetCachedArrayIndex) \ 103 V(GetCachedArrayIndex) \
98 V(Goto) \ 104 V(Goto) \
99 V(HasCachedArrayIndexAndBranch) \ 105 V(HasCachedArrayIndexAndBranch) \
100 V(HasInstanceTypeAndBranch) \ 106 V(HasInstanceTypeAndBranch) \
101 V(InnerAllocatedObject) \ 107 V(InnerAllocatedObject) \
102 V(InstanceOf) \ 108 V(InstanceOf) \
103 V(InstanceOfKnownGlobal) \ 109 V(InstanceOfKnownGlobal) \
104 V(InstructionGap) \ 110 V(InstructionGap) \
105 V(Integer32ToDouble) \ 111 V(Integer32ToDouble) \
106 V(Integer32ToSmi) \
107 V(InvokeFunction) \ 112 V(InvokeFunction) \
108 V(IsConstructCallAndBranch) \ 113 V(IsConstructCallAndBranch) \
109 V(IsObjectAndBranch) \ 114 V(IsObjectAndBranch) \
110 V(IsStringAndBranch) \ 115 V(IsStringAndBranch) \
111 V(IsSmiAndBranch) \ 116 V(IsSmiAndBranch) \
112 V(IsUndetectableAndBranch) \ 117 V(IsUndetectableAndBranch) \
113 V(Label) \ 118 V(Label) \
114 V(LazyBailout) \ 119 V(LazyBailout) \
115 V(LoadContextSlot) \ 120 V(LoadContextSlot) \
116 V(LoadRoot) \ 121 V(LoadRoot) \
117 V(LoadFieldByIndex) \ 122 V(LoadFieldByIndex) \
118 V(LoadFunctionPrototype) \ 123 V(LoadFunctionPrototype) \
119 V(LoadGlobalCell) \ 124 V(LoadGlobalCell) \
120 V(LoadGlobalGeneric) \ 125 V(LoadGlobalGeneric) \
121 V(LoadKeyed) \ 126 V(LoadKeyed) \
122 V(LoadKeyedGeneric) \ 127 V(LoadKeyedGeneric) \
123 V(LoadNamedField) \ 128 V(LoadNamedField) \
124 V(LoadNamedGeneric) \ 129 V(LoadNamedGeneric) \
125 V(MapEnumLength) \ 130 V(MapEnumLength) \
126 V(MathAbs) \ 131 V(MathAbs) \
127 V(MathClz32) \ 132 V(MathClz32) \
128 V(MathExp) \ 133 V(MathExp) \
129 V(MathFloor) \ 134 V(MathFloor) \
130 V(MathFloorOfDiv) \
131 V(MathLog) \ 135 V(MathLog) \
132 V(MathMinMax) \ 136 V(MathMinMax) \
133 V(MathPowHalf) \ 137 V(MathPowHalf) \
134 V(MathRound) \ 138 V(MathRound) \
135 V(MathSqrt) \ 139 V(MathSqrt) \
140 V(ModByConstI) \
141 V(ModByPowerOf2I) \
136 V(ModI) \ 142 V(ModI) \
137 V(MulI) \ 143 V(MulI) \
138 V(NumberTagD) \ 144 V(NumberTagD) \
139 V(NumberTagI) \ 145 V(NumberTagI) \
140 V(NumberTagU) \ 146 V(NumberTagU) \
141 V(NumberUntagD) \ 147 V(NumberUntagD) \
142 V(OsrEntry) \ 148 V(OsrEntry) \
143 V(Parameter) \ 149 V(Parameter) \
144 V(Power) \ 150 V(Power) \
145 V(PushArgument) \ 151 V(PushArgument) \
(...skipping 18 matching lines...) Expand all
164 V(StringCompareAndBranch) \ 170 V(StringCompareAndBranch) \
165 V(SubI) \ 171 V(SubI) \
166 V(TaggedToI) \ 172 V(TaggedToI) \
167 V(ThisFunction) \ 173 V(ThisFunction) \
168 V(ToFastProperties) \ 174 V(ToFastProperties) \
169 V(TransitionElementsKind) \ 175 V(TransitionElementsKind) \
170 V(TrapAllocationMemento) \ 176 V(TrapAllocationMemento) \
171 V(Typeof) \ 177 V(Typeof) \
172 V(TypeofIsAndBranch) \ 178 V(TypeofIsAndBranch) \
173 V(Uint32ToDouble) \ 179 V(Uint32ToDouble) \
174 V(Uint32ToSmi) \
175 V(UnknownOSRValue) \ 180 V(UnknownOSRValue) \
176 V(WrapReceiver) 181 V(WrapReceiver)
177 182
178 183
179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
180 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ 185 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \
181 return LInstruction::k##type; \ 186 return LInstruction::k##type; \
182 } \ 187 } \
183 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ 188 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \
184 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ 189 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 }; 613 };
609 614
610 615
611 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { 616 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> {
612 public: 617 public:
613 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 618 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
614 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 619 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
615 }; 620 };
616 621
617 622
623 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
624 public:
625 LModByPowerOf2I(LOperand* dividend, int32_t divisor) {
626 inputs_[0] = dividend;
627 divisor_ = divisor;
628 }
629
630 LOperand* dividend() { return inputs_[0]; }
631 int32_t divisor() const { return divisor_; }
632
633 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i")
634 DECLARE_HYDROGEN_ACCESSOR(Mod)
635
636 private:
637 int32_t divisor_;
638 };
639
640
641 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
642 public:
643 LModByConstI(LOperand* dividend,
644 int32_t divisor,
645 LOperand* temp1,
646 LOperand* temp2) {
647 inputs_[0] = dividend;
648 divisor_ = divisor;
649 temps_[0] = temp1;
650 temps_[1] = temp2;
651 }
652
653 LOperand* dividend() { return inputs_[0]; }
654 int32_t divisor() const { return divisor_; }
655 LOperand* temp1() { return temps_[0]; }
656 LOperand* temp2() { return temps_[1]; }
657
658 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i")
659 DECLARE_HYDROGEN_ACCESSOR(Mod)
660
661 private:
662 int32_t divisor_;
663 };
664
665
618 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { 666 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
619 public: 667 public:
620 LModI(LOperand* left, LOperand* right, LOperand* temp) { 668 LModI(LOperand* left, LOperand* right, LOperand* temp) {
621 inputs_[0] = left; 669 inputs_[0] = left;
622 inputs_[1] = right; 670 inputs_[1] = right;
623 temps_[0] = temp; 671 temps_[0] = temp;
624 } 672 }
625 673
626 LOperand* left() { return inputs_[0]; } 674 LOperand* left() { return inputs_[0]; }
627 LOperand* right() { return inputs_[1]; } 675 LOperand* right() { return inputs_[1]; }
628 LOperand* temp() { return temps_[0]; } 676 LOperand* temp() { return temps_[0]; }
629 677
630 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 678 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
631 DECLARE_HYDROGEN_ACCESSOR(Mod) 679 DECLARE_HYDROGEN_ACCESSOR(Mod)
632 }; 680 };
633 681
634 682
683 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
684 public:
685 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
686 inputs_[0] = dividend;
687 divisor_ = divisor;
688 }
689
690 LOperand* dividend() { return inputs_[0]; }
691 int32_t divisor() const { return divisor_; }
692
693 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i")
694 DECLARE_HYDROGEN_ACCESSOR(Div)
695
696 private:
697 int32_t divisor_;
698 };
699
700
701 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
702 public:
703 LDivByConstI(LOperand* dividend,
704 int32_t divisor,
705 LOperand* temp1,
706 LOperand* temp2) {
707 inputs_[0] = dividend;
708 divisor_ = divisor;
709 temps_[0] = temp1;
710 temps_[1] = temp2;
711 }
712
713 LOperand* dividend() { return inputs_[0]; }
714 int32_t divisor() const { return divisor_; }
715 LOperand* temp1() { return temps_[0]; }
716 LOperand* temp2() { return temps_[1]; }
717
718 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i")
719 DECLARE_HYDROGEN_ACCESSOR(Div)
720
721 private:
722 int32_t divisor_;
723 };
724
725
635 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { 726 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
636 public: 727 public:
637 LDivI(LOperand* left, LOperand* right, LOperand* temp) { 728 LDivI(LOperand* left, LOperand* right, LOperand* temp) {
638 inputs_[0] = left; 729 inputs_[0] = left;
639 inputs_[1] = right; 730 inputs_[1] = right;
640 temps_[0] = temp; 731 temps_[0] = temp;
641 } 732 }
642 733
643 LOperand* left() { return inputs_[0]; } 734 LOperand* left() { return inputs_[0]; }
644 LOperand* right() { return inputs_[1]; } 735 LOperand* right() { return inputs_[1]; }
645 LOperand* temp() { return temps_[0]; } 736 LOperand* temp() { return temps_[0]; }
646 737
647 bool is_flooring() { return hydrogen_value()->IsMathFloorOfDiv(); }
648
649 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 738 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
650 DECLARE_HYDROGEN_ACCESSOR(Div) 739 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation)
651 }; 740 };
652 741
653 742
654 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { 743 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
655 public: 744 public:
656 LMathFloorOfDiv(LOperand* left, 745 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
657 LOperand* right, 746 inputs_[0] = dividend;
658 LOperand* temp = NULL) { 747 divisor_ = divisor;
659 inputs_[0] = left;
660 inputs_[1] = right;
661 temps_[0] = temp;
662 } 748 }
663 749
664 LOperand* left() { return inputs_[0]; } 750 LOperand* dividend() { return inputs_[0]; }
665 LOperand* right() { return inputs_[1]; } 751 int32_t divisor() const { return divisor_; }
666 LOperand* temp() { return temps_[0]; }
667 752
668 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 753 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I,
754 "flooring-div-by-power-of-2-i")
669 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 755 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
756
757 private:
758 int32_t divisor_;
670 }; 759 };
671 760
672 761
762 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
763 public:
764 LFlooringDivByConstI(LOperand* dividend,
765 int32_t divisor,
766 LOperand* temp1,
767 LOperand* temp2) {
768 inputs_[0] = dividend;
769 divisor_ = divisor;
770 temps_[0] = temp1;
771 temps_[1] = temp2;
772 }
773
774 LOperand* dividend() { return inputs_[0]; }
775 int32_t divisor() const { return divisor_; }
776 LOperand* temp1() { return temps_[0]; }
777 LOperand* temp2() { return temps_[0]; }
778
779 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
780 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
781
782 private:
783 int32_t divisor_;
784 };
785
786
673 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 787 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
674 public: 788 public:
675 LMulI(LOperand* left, LOperand* right) { 789 LMulI(LOperand* left, LOperand* right) {
676 inputs_[0] = left; 790 inputs_[0] = left;
677 inputs_[1] = right; 791 inputs_[1] = right;
678 } 792 }
679 793
680 LOperand* left() { return inputs_[0]; } 794 LOperand* left() { return inputs_[0]; }
681 LOperand* right() { return inputs_[1]; } 795 LOperand* right() { return inputs_[1]; }
682 796
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 inputs_[0] = value; 828 inputs_[0] = value;
715 } 829 }
716 830
717 LOperand* value() { return inputs_[0]; } 831 LOperand* value() { return inputs_[0]; }
718 832
719 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") 833 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
720 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 834 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
721 }; 835 };
722 836
723 837
724 class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 0> { 838 class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 1> {
725 public: 839 public:
726 explicit LMathRound(LOperand* value) { 840 explicit LMathRound(LOperand* value, LOperand* temp) {
727 inputs_[0] = value; 841 inputs_[0] = value;
842 temps_[0] = temp;
728 } 843 }
729 844
730 LOperand* value() { return inputs_[0]; } 845 LOperand* value() { return inputs_[0]; }
846 LOperand* temp() { return temps_[0]; }
731 847
732 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 848 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
733 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 849 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
734 }; 850 };
735 851
736 852
737 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { 853 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> {
738 public: 854 public:
739 explicit LMathAbs(LOperand* context, LOperand* value) { 855 explicit LMathAbs(LOperand* context, LOperand* value) {
740 inputs_[1] = context; 856 inputs_[1] = context;
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 explicit LInteger32ToDouble(LOperand* value) { 1949 explicit LInteger32ToDouble(LOperand* value) {
1834 inputs_[0] = value; 1950 inputs_[0] = value;
1835 } 1951 }
1836 1952
1837 LOperand* value() { return inputs_[0]; } 1953 LOperand* value() { return inputs_[0]; }
1838 1954
1839 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1955 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1840 }; 1956 };
1841 1957
1842 1958
1843 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1844 public:
1845 explicit LInteger32ToSmi(LOperand* value) {
1846 inputs_[0] = value;
1847 }
1848
1849 LOperand* value() { return inputs_[0]; }
1850
1851 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi")
1852 DECLARE_HYDROGEN_ACCESSOR(Change)
1853 };
1854
1855
1856 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> { 1959 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1857 public: 1960 public:
1858 explicit LUint32ToDouble(LOperand* value, LOperand* temp) { 1961 explicit LUint32ToDouble(LOperand* value, LOperand* temp) {
1859 inputs_[0] = value; 1962 inputs_[0] = value;
1860 temps_[0] = temp; 1963 temps_[0] = temp;
1861 } 1964 }
1862 1965
1863 LOperand* value() { return inputs_[0]; } 1966 LOperand* value() { return inputs_[0]; }
1864 LOperand* temp() { return temps_[0]; } 1967 LOperand* temp() { return temps_[0]; }
1865 1968
1866 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 1969 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
1867 }; 1970 };
1868 1971
1869 1972
1870 class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1871 public:
1872 explicit LUint32ToSmi(LOperand* value) {
1873 inputs_[0] = value;
1874 }
1875
1876 LOperand* value() { return inputs_[0]; }
1877
1878 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi")
1879 DECLARE_HYDROGEN_ACCESSOR(Change)
1880 };
1881
1882
1883 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1973 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1884 public: 1974 public:
1885 explicit LNumberTagI(LOperand* value) { 1975 explicit LNumberTagI(LOperand* value) {
1886 inputs_[0] = value; 1976 inputs_[0] = value;
1887 } 1977 }
1888 1978
1889 LOperand* value() { return inputs_[0]; } 1979 LOperand* value() { return inputs_[0]; }
1890 1980
1891 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") 1981 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1892 }; 1982 };
1893 1983
1894 1984
1895 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 1> { 1985 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1896 public: 1986 public:
1897 explicit LNumberTagU(LOperand* value, LOperand* temp) { 1987 LNumberTagU(LOperand* value, LOperand* temp1, LOperand* temp2) {
1898 inputs_[0] = value; 1988 inputs_[0] = value;
1899 temps_[0] = temp; 1989 temps_[0] = temp1;
1990 temps_[1] = temp2;
1900 } 1991 }
1901 1992
1902 LOperand* value() { return inputs_[0]; } 1993 LOperand* value() { return inputs_[0]; }
1903 LOperand* temp() { return temps_[0]; } 1994 LOperand* temp1() { return temps_[0]; }
1995 LOperand* temp2() { return temps_[1]; }
1904 1996
1905 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 1997 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
1906 }; 1998 };
1907 1999
1908 2000
1909 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { 2001 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> {
1910 public: 2002 public:
1911 explicit LNumberTagD(LOperand* value, LOperand* temp) { 2003 explicit LNumberTagD(LOperand* value, LOperand* temp) {
1912 inputs_[0] = value; 2004 inputs_[0] = value;
1913 temps_[0] = temp; 2005 temps_[0] = temp;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 2062
1971 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2063 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1972 public: 2064 public:
1973 explicit LSmiTag(LOperand* value) { 2065 explicit LSmiTag(LOperand* value) {
1974 inputs_[0] = value; 2066 inputs_[0] = value;
1975 } 2067 }
1976 2068
1977 LOperand* value() { return inputs_[0]; } 2069 LOperand* value() { return inputs_[0]; }
1978 2070
1979 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 2071 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
2072 DECLARE_HYDROGEN_ACCESSOR(Change)
1980 }; 2073 };
1981 2074
1982 2075
1983 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2076 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1984 public: 2077 public:
1985 explicit LNumberUntagD(LOperand* value) { 2078 explicit LNumberUntagD(LOperand* value) {
1986 inputs_[0] = value; 2079 inputs_[0] = value;
1987 } 2080 }
1988 2081
1989 LOperand* value() { return inputs_[0]; } 2082 LOperand* value() { return inputs_[0]; }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 LOperand* context() { return inputs_[0]; } 2138 LOperand* context() { return inputs_[0]; }
2046 LOperand* object() { return inputs_[1]; } 2139 LOperand* object() { return inputs_[1]; }
2047 LOperand* value() { return inputs_[2]; } 2140 LOperand* value() { return inputs_[2]; }
2048 2141
2049 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2142 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2050 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2143 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2051 2144
2052 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2145 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2053 2146
2054 Handle<Object> name() const { return hydrogen()->name(); } 2147 Handle<Object> name() const { return hydrogen()->name(); }
2055 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2148 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2056 }; 2149 };
2057 2150
2058 2151
2059 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2152 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2060 public: 2153 public:
2061 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2154 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2062 inputs_[0] = object; 2155 inputs_[0] = object;
2063 inputs_[1] = key; 2156 inputs_[1] = key;
2064 inputs_[2] = value; 2157 inputs_[2] = value;
2065 } 2158 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 LOperand* context() { return inputs_[0]; } 2193 LOperand* context() { return inputs_[0]; }
2101 LOperand* object() { return inputs_[1]; } 2194 LOperand* object() { return inputs_[1]; }
2102 LOperand* key() { return inputs_[2]; } 2195 LOperand* key() { return inputs_[2]; }
2103 LOperand* value() { return inputs_[3]; } 2196 LOperand* value() { return inputs_[3]; }
2104 2197
2105 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2198 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2106 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2199 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2107 2200
2108 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2201 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2109 2202
2110 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2203 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2111 }; 2204 };
2112 2205
2113 2206
2114 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> { 2207 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> {
2115 public: 2208 public:
2116 LTransitionElementsKind(LOperand* object, 2209 LTransitionElementsKind(LOperand* object,
2117 LOperand* context, 2210 LOperand* context,
2118 LOperand* new_map_temp, 2211 LOperand* new_map_temp,
2119 LOperand* temp) { 2212 LOperand* temp) {
2120 inputs_[0] = object; 2213 inputs_[0] = object;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 inputs_[0] = value; 2397 inputs_[0] = value;
2305 } 2398 }
2306 2399
2307 LOperand* value() { return inputs_[0]; } 2400 LOperand* value() { return inputs_[0]; }
2308 2401
2309 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2402 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
2310 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) 2403 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject)
2311 }; 2404 };
2312 2405
2313 2406
2407 class LDoubleBits V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2408 public:
2409 explicit LDoubleBits(LOperand* value) {
2410 inputs_[0] = value;
2411 }
2412
2413 LOperand* value() { return inputs_[0]; }
2414
2415 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits")
2416 DECLARE_HYDROGEN_ACCESSOR(DoubleBits)
2417 };
2418
2419
2420 class LConstructDouble V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2421 public:
2422 LConstructDouble(LOperand* hi, LOperand* lo) {
2423 inputs_[0] = hi;
2424 inputs_[1] = lo;
2425 }
2426
2427 LOperand* hi() { return inputs_[0]; }
2428 LOperand* lo() { return inputs_[1]; }
2429
2430 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double")
2431 };
2432
2433
2314 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> { 2434 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> {
2315 public: 2435 public:
2316 LAllocate(LOperand* context, LOperand* size, LOperand* temp) { 2436 LAllocate(LOperand* context, LOperand* size, LOperand* temp) {
2317 inputs_[0] = context; 2437 inputs_[0] = context;
2318 inputs_[1] = size; 2438 inputs_[1] = size;
2319 temps_[0] = temp; 2439 temps_[0] = temp;
2320 } 2440 }
2321 2441
2322 LOperand* context() { return inputs_[0]; } 2442 LOperand* context() { return inputs_[0]; }
2323 LOperand* size() { return inputs_[1]; } 2443 LOperand* size() { return inputs_[1]; }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 public: 2634 public:
2515 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2635 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2516 : LChunkBuilderBase(graph->zone()), 2636 : LChunkBuilderBase(graph->zone()),
2517 chunk_(NULL), 2637 chunk_(NULL),
2518 info_(info), 2638 info_(info),
2519 graph_(graph), 2639 graph_(graph),
2520 status_(UNUSED), 2640 status_(UNUSED),
2521 current_instruction_(NULL), 2641 current_instruction_(NULL),
2522 current_block_(NULL), 2642 current_block_(NULL),
2523 next_block_(NULL), 2643 next_block_(NULL),
2524 allocator_(allocator), 2644 allocator_(allocator) { }
2525 instruction_pending_deoptimization_environment_(NULL),
2526 pending_deoptimization_ast_id_(BailoutId::None()) { }
2527 2645
2528 // Build the sequence for the graph. 2646 // Build the sequence for the graph.
2529 LPlatformChunk* Build(); 2647 LPlatformChunk* Build();
2530 2648
2531 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); 2649 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2532 2650
2533 // Declare methods that deal with the individual node types. 2651 // Declare methods that deal with the individual node types.
2534 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2652 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2535 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2653 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2536 #undef DECLARE_DO 2654 #undef DECLARE_DO
2537 2655
2538 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2656 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2539 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2657 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2540 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2658 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2541 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2659 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2542 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2660 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2543 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2661 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2544 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2662 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2545 LInstruction* DoMathClz32(HUnaryMathOperation* instr); 2663 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2664 LInstruction* DoDivByPowerOf2I(HDiv* instr);
2665 LInstruction* DoDivByConstI(HDiv* instr);
2666 LInstruction* DoDivI(HBinaryOperation* instr);
2667 LInstruction* DoModByPowerOf2I(HMod* instr);
2668 LInstruction* DoModByConstI(HMod* instr);
2669 LInstruction* DoModI(HMod* instr);
2670 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2671 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2546 2672
2547 private: 2673 private:
2548 enum Status { 2674 enum Status {
2549 UNUSED, 2675 UNUSED,
2550 BUILDING, 2676 BUILDING,
2551 DONE, 2677 DONE,
2552 ABORTED 2678 ABORTED
2553 }; 2679 };
2554 2680
2555 LPlatformChunk* chunk() const { return chunk_; } 2681 LPlatformChunk* chunk() const { return chunk_; }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 HBinaryOperation* instr); 2779 HBinaryOperation* instr);
2654 2780
2655 LPlatformChunk* chunk_; 2781 LPlatformChunk* chunk_;
2656 CompilationInfo* info_; 2782 CompilationInfo* info_;
2657 HGraph* const graph_; 2783 HGraph* const graph_;
2658 Status status_; 2784 Status status_;
2659 HInstruction* current_instruction_; 2785 HInstruction* current_instruction_;
2660 HBasicBlock* current_block_; 2786 HBasicBlock* current_block_;
2661 HBasicBlock* next_block_; 2787 HBasicBlock* next_block_;
2662 LAllocator* allocator_; 2788 LAllocator* allocator_;
2663 LInstruction* instruction_pending_deoptimization_environment_;
2664 BailoutId pending_deoptimization_ast_id_;
2665 2789
2666 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2790 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2667 }; 2791 };
2668 2792
2669 #undef DECLARE_HYDROGEN_ACCESSOR 2793 #undef DECLARE_HYDROGEN_ACCESSOR
2670 #undef DECLARE_CONCRETE_INSTRUCTION 2794 #undef DECLARE_CONCRETE_INSTRUCTION
2671 2795
2672 } } // namespace v8::int 2796 } } // namespace v8::int
2673 2797
2674 #endif // V8_X64_LITHIUM_X64_H_ 2798 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698