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

Side by Side Diff: src/mips/lithium-mips.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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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) \
89 V(DoubleToI) \ 92 V(DoubleToI) \
93 V(DoubleBits) \
90 V(DoubleToSmi) \ 94 V(DoubleToSmi) \
91 V(Drop) \ 95 V(Drop) \
92 V(Dummy) \ 96 V(Dummy) \
93 V(DummyUse) \ 97 V(DummyUse) \
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(MathExp) \ 132 V(MathExp) \
128 V(MathClz32) \ 133 V(MathClz32) \
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(MultiplyAddD) \ 144 V(MultiplyAddD) \
139 V(NumberTagD) \ 145 V(NumberTagD) \
140 V(NumberTagI) \ 146 V(NumberTagI) \
141 V(NumberTagU) \ 147 V(NumberTagU) \
142 V(NumberUntagD) \ 148 V(NumberUntagD) \
143 V(OsrEntry) \ 149 V(OsrEntry) \
144 V(Parameter) \ 150 V(Parameter) \
145 V(Power) \ 151 V(Power) \
(...skipping 19 matching lines...) Expand all
165 V(StringCompareAndBranch) \ 171 V(StringCompareAndBranch) \
166 V(SubI) \ 172 V(SubI) \
167 V(TaggedToI) \ 173 V(TaggedToI) \
168 V(ThisFunction) \ 174 V(ThisFunction) \
169 V(ToFastProperties) \ 175 V(ToFastProperties) \
170 V(TransitionElementsKind) \ 176 V(TransitionElementsKind) \
171 V(TrapAllocationMemento) \ 177 V(TrapAllocationMemento) \
172 V(Typeof) \ 178 V(Typeof) \
173 V(TypeofIsAndBranch) \ 179 V(TypeofIsAndBranch) \
174 V(Uint32ToDouble) \ 180 V(Uint32ToDouble) \
175 V(Uint32ToSmi) \
176 V(UnknownOSRValue) \ 181 V(UnknownOSRValue) \
177 V(WrapReceiver) 182 V(WrapReceiver)
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 { \
185 return mnemonic; \ 190 return mnemonic; \
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 }; 612 };
608 613
609 614
610 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { 615 class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> {
611 public: 616 public:
612 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") 617 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements")
613 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) 618 DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements)
614 }; 619 };
615 620
616 621
622 class LModByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
623 public:
624 LModByPowerOf2I(LOperand* dividend, int32_t divisor) {
625 inputs_[0] = dividend;
626 divisor_ = divisor;
627 }
628
629 LOperand* dividend() { return inputs_[0]; }
630 int32_t divisor() const { return divisor_; }
631
632 DECLARE_CONCRETE_INSTRUCTION(ModByPowerOf2I, "mod-by-power-of-2-i")
633 DECLARE_HYDROGEN_ACCESSOR(Mod)
634
635 private:
636 int32_t divisor_;
637 };
638
639
640 class LModByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
641 public:
642 LModByConstI(LOperand* dividend, int32_t divisor) {
643 inputs_[0] = dividend;
644 divisor_ = divisor;
645 }
646
647 LOperand* dividend() { return inputs_[0]; }
648 int32_t divisor() const { return divisor_; }
649
650 DECLARE_CONCRETE_INSTRUCTION(ModByConstI, "mod-by-const-i")
651 DECLARE_HYDROGEN_ACCESSOR(Mod)
652
653 private:
654 int32_t divisor_;
655 };
656
657
617 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 3> { 658 class LModI V8_FINAL : public LTemplateInstruction<1, 2, 3> {
618 public: 659 public:
619 // Used when the right hand is a constant power of 2.
620 LModI(LOperand* left, 660 LModI(LOperand* left,
621 LOperand* right) { 661 LOperand* right) {
622 inputs_[0] = left; 662 inputs_[0] = left;
623 inputs_[1] = right; 663 inputs_[1] = right;
624 temps_[0] = NULL;
625 temps_[1] = NULL;
626 temps_[2] = NULL;
627 }
628
629 // Used for the standard case.
630 LModI(LOperand* left,
631 LOperand* right,
632 LOperand* temp,
633 LOperand* temp2,
634 LOperand* temp3) {
635 inputs_[0] = left;
636 inputs_[1] = right;
637 temps_[0] = temp;
638 temps_[1] = temp2;
639 temps_[2] = temp3;
640 } 664 }
641 665
642 LOperand* left() { return inputs_[0]; } 666 LOperand* left() { return inputs_[0]; }
643 LOperand* right() { return inputs_[1]; } 667 LOperand* right() { return inputs_[1]; }
644 LOperand* temp() { return temps_[0]; }
645 LOperand* temp2() { return temps_[1]; }
646 LOperand* temp3() { return temps_[2]; }
647 668
648 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i") 669 DECLARE_CONCRETE_INSTRUCTION(ModI, "mod-i")
649 DECLARE_HYDROGEN_ACCESSOR(Mod) 670 DECLARE_HYDROGEN_ACCESSOR(Mod)
650 }; 671 };
651 672
652 673
674 class LDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
675 public:
676 LDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
677 inputs_[0] = dividend;
678 divisor_ = divisor;
679 }
680
681 LOperand* dividend() { return inputs_[0]; }
682 int32_t divisor() const { return divisor_; }
683
684 DECLARE_CONCRETE_INSTRUCTION(DivByPowerOf2I, "div-by-power-of-2-i")
685 DECLARE_HYDROGEN_ACCESSOR(Div)
686
687 private:
688 int32_t divisor_;
689 };
690
691
692 class LDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
693 public:
694 LDivByConstI(LOperand* dividend, int32_t divisor) {
695 inputs_[0] = dividend;
696 divisor_ = divisor;
697 }
698
699 LOperand* dividend() { return inputs_[0]; }
700 int32_t divisor() const { return divisor_; }
701
702 DECLARE_CONCRETE_INSTRUCTION(DivByConstI, "div-by-const-i")
703 DECLARE_HYDROGEN_ACCESSOR(Div)
704
705 private:
706 int32_t divisor_;
707 };
708
709
653 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 710 class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
654 public: 711 public:
655 LDivI(LOperand* left, LOperand* right) { 712 LDivI(LOperand* left, LOperand* right) {
656 inputs_[0] = left; 713 inputs_[0] = left;
657 inputs_[1] = right; 714 inputs_[1] = right;
658 } 715 }
659 716
660 LOperand* left() { return inputs_[0]; } 717 LOperand* left() { return inputs_[0]; }
661 LOperand* right() { return inputs_[1]; } 718 LOperand* right() { return inputs_[1]; }
662 719
663 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") 720 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i")
664 DECLARE_HYDROGEN_ACCESSOR(Div) 721 DECLARE_HYDROGEN_ACCESSOR(BinaryOperation)
665 }; 722 };
666 723
667 724
668 class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { 725 class LFlooringDivByPowerOf2I V8_FINAL : public LTemplateInstruction<1, 1, 0> {
669 public: 726 public:
670 LMathFloorOfDiv(LOperand* left, 727 LFlooringDivByPowerOf2I(LOperand* dividend, int32_t divisor) {
671 LOperand* right, 728 inputs_[0] = dividend;
672 LOperand* temp = NULL) { 729 divisor_ = divisor;
673 inputs_[0] = left;
674 inputs_[1] = right;
675 temps_[0] = temp;
676 } 730 }
677 731
678 LOperand* left() { return inputs_[0]; } 732 LOperand* dividend() { return inputs_[0]; }
679 LOperand* right() { return inputs_[1]; } 733 int32_t divisor() { return divisor_; }
680 LOperand* temp() { return temps_[0]; }
681 734
682 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 735 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I,
736 "flooring-div-by-power-of-2-i")
683 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 737 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
738
739 private:
740 int32_t divisor_;
684 }; 741 };
685 742
686 743
744 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
745 public:
746 LFlooringDivByConstI(LOperand* dividend, int32_t divisor) {
747 inputs_[0] = dividend;
748 divisor_ = divisor;
749 }
750
751 LOperand* dividend() { return inputs_[0]; }
752 int32_t divisor() const { return divisor_; }
753 LOperand* temp1() { return temps_[0]; }
754
755 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
756 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
757
758 private:
759 int32_t divisor_;
760 };
761
762
687 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 763 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
688 public: 764 public:
689 LMulI(LOperand* left, LOperand* right) { 765 LMulI(LOperand* left, LOperand* right) {
690 inputs_[0] = left; 766 inputs_[0] = left;
691 inputs_[1] = right; 767 inputs_[1] = right;
692 } 768 }
693 769
694 LOperand* left() { return inputs_[0]; } 770 LOperand* left() { return inputs_[0]; }
695 LOperand* right() { return inputs_[1]; } 771 LOperand* right() { return inputs_[1]; }
696 772
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 explicit LInteger32ToDouble(LOperand* value) { 1945 explicit LInteger32ToDouble(LOperand* value) {
1870 inputs_[0] = value; 1946 inputs_[0] = value;
1871 } 1947 }
1872 1948
1873 LOperand* value() { return inputs_[0]; } 1949 LOperand* value() { return inputs_[0]; }
1874 1950
1875 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double") 1951 DECLARE_CONCRETE_INSTRUCTION(Integer32ToDouble, "int32-to-double")
1876 }; 1952 };
1877 1953
1878 1954
1879 class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1880 public:
1881 explicit LInteger32ToSmi(LOperand* value) {
1882 inputs_[0] = value;
1883 }
1884
1885 LOperand* value() { return inputs_[0]; }
1886
1887 DECLARE_CONCRETE_INSTRUCTION(Integer32ToSmi, "int32-to-smi")
1888 DECLARE_HYDROGEN_ACCESSOR(Change)
1889 };
1890
1891
1892 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1955 class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1893 public: 1956 public:
1894 explicit LUint32ToDouble(LOperand* value) { 1957 explicit LUint32ToDouble(LOperand* value) {
1895 inputs_[0] = value; 1958 inputs_[0] = value;
1896 } 1959 }
1897 1960
1898 LOperand* value() { return inputs_[0]; } 1961 LOperand* value() { return inputs_[0]; }
1899 1962
1900 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double") 1963 DECLARE_CONCRETE_INSTRUCTION(Uint32ToDouble, "uint32-to-double")
1901 }; 1964 };
1902 1965
1903 1966
1904 class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1967 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1905 public: 1968 public:
1906 explicit LUint32ToSmi(LOperand* value) { 1969 LNumberTagI(LOperand* value, LOperand* temp1, LOperand* temp2) {
1907 inputs_[0] = value; 1970 inputs_[0] = value;
1971 temps_[0] = temp1;
1972 temps_[1] = temp2;
1908 } 1973 }
1909 1974
1910 LOperand* value() { return inputs_[0]; } 1975 LOperand* value() { return inputs_[0]; }
1911 1976 LOperand* temp1() { return temps_[0]; }
1912 DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") 1977 LOperand* temp2() { return temps_[1]; }
1913 DECLARE_HYDROGEN_ACCESSOR(Change)
1914 };
1915
1916
1917 class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1918 public:
1919 explicit LNumberTagI(LOperand* value) {
1920 inputs_[0] = value;
1921 }
1922
1923 LOperand* value() { return inputs_[0]; }
1924 1978
1925 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i") 1979 DECLARE_CONCRETE_INSTRUCTION(NumberTagI, "number-tag-i")
1926 }; 1980 };
1927 1981
1928 1982
1929 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1983 class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1930 public: 1984 public:
1931 explicit LNumberTagU(LOperand* value) { 1985 LNumberTagU(LOperand* value, LOperand* temp1, LOperand* temp2) {
1932 inputs_[0] = value; 1986 inputs_[0] = value;
1987 temps_[0] = temp1;
1988 temps_[1] = temp2;
1933 } 1989 }
1934 1990
1935 LOperand* value() { return inputs_[0]; } 1991 LOperand* value() { return inputs_[0]; }
1992 LOperand* temp1() { return temps_[0]; }
1993 LOperand* temp2() { return temps_[1]; }
1936 1994
1937 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") 1995 DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u")
1938 }; 1996 };
1939 1997
1940 1998
1941 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> { 1999 class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1942 public: 2000 public:
1943 LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) { 2001 LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) {
1944 inputs_[0] = value; 2002 inputs_[0] = value;
1945 temps_[0] = temp; 2003 temps_[0] = temp;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 2068
2011 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2069 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2012 public: 2070 public:
2013 explicit LSmiTag(LOperand* value) { 2071 explicit LSmiTag(LOperand* value) {
2014 inputs_[0] = value; 2072 inputs_[0] = value;
2015 } 2073 }
2016 2074
2017 LOperand* value() { return inputs_[0]; } 2075 LOperand* value() { return inputs_[0]; }
2018 2076
2019 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag") 2077 DECLARE_CONCRETE_INSTRUCTION(SmiTag, "smi-tag")
2078 DECLARE_HYDROGEN_ACCESSOR(Change)
2020 }; 2079 };
2021 2080
2022 2081
2023 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2082 class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2024 public: 2083 public:
2025 explicit LNumberUntagD(LOperand* value) { 2084 explicit LNumberUntagD(LOperand* value) {
2026 inputs_[0] = value; 2085 inputs_[0] = value;
2027 } 2086 }
2028 2087
2029 LOperand* value() { return inputs_[0]; } 2088 LOperand* value() { return inputs_[0]; }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 LOperand* context() { return inputs_[0]; } 2144 LOperand* context() { return inputs_[0]; }
2086 LOperand* object() { return inputs_[1]; } 2145 LOperand* object() { return inputs_[1]; }
2087 LOperand* value() { return inputs_[2]; } 2146 LOperand* value() { return inputs_[2]; }
2088 2147
2089 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2148 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2090 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2149 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2091 2150
2092 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2151 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2093 2152
2094 Handle<Object> name() const { return hydrogen()->name(); } 2153 Handle<Object> name() const { return hydrogen()->name(); }
2095 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2154 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2096 }; 2155 };
2097 2156
2098 2157
2099 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2158 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2100 public: 2159 public:
2101 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { 2160 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
2102 inputs_[0] = object; 2161 inputs_[0] = object;
2103 inputs_[1] = key; 2162 inputs_[1] = key;
2104 inputs_[2] = value; 2163 inputs_[2] = value;
2105 } 2164 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 LOperand* context() { return inputs_[0]; } 2201 LOperand* context() { return inputs_[0]; }
2143 LOperand* object() { return inputs_[1]; } 2202 LOperand* object() { return inputs_[1]; }
2144 LOperand* key() { return inputs_[2]; } 2203 LOperand* key() { return inputs_[2]; }
2145 LOperand* value() { return inputs_[3]; } 2204 LOperand* value() { return inputs_[3]; }
2146 2205
2147 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2206 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2148 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2207 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2149 2208
2150 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2209 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2151 2210
2152 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2211 StrictMode strict_mode() { return hydrogen()->strict_mode(); }
2153 }; 2212 };
2154 2213
2155 2214
2156 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> { 2215 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2157 public: 2216 public:
2158 LTransitionElementsKind(LOperand* object, 2217 LTransitionElementsKind(LOperand* object,
2159 LOperand* context, 2218 LOperand* context,
2160 LOperand* new_map_temp) { 2219 LOperand* new_map_temp) {
2161 inputs_[0] = object; 2220 inputs_[0] = object;
2162 inputs_[1] = context; 2221 inputs_[1] = context;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 temps_[0] = temp; 2404 temps_[0] = temp;
2346 } 2405 }
2347 2406
2348 LOperand* unclamped() { return inputs_[0]; } 2407 LOperand* unclamped() { return inputs_[0]; }
2349 LOperand* temp() { return temps_[0]; } 2408 LOperand* temp() { return temps_[0]; }
2350 2409
2351 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2410 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2352 }; 2411 };
2353 2412
2354 2413
2414 class LDoubleBits V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2415 public:
2416 explicit LDoubleBits(LOperand* value) {
2417 inputs_[0] = value;
2418 }
2419
2420 LOperand* value() { return inputs_[0]; }
2421
2422 DECLARE_CONCRETE_INSTRUCTION(DoubleBits, "double-bits")
2423 DECLARE_HYDROGEN_ACCESSOR(DoubleBits)
2424 };
2425
2426
2427 class LConstructDouble V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2428 public:
2429 LConstructDouble(LOperand* hi, LOperand* lo) {
2430 inputs_[0] = hi;
2431 inputs_[1] = lo;
2432 }
2433
2434 LOperand* hi() { return inputs_[0]; }
2435 LOperand* lo() { return inputs_[1]; }
2436
2437 DECLARE_CONCRETE_INSTRUCTION(ConstructDouble, "construct-double")
2438 };
2439
2440
2355 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { 2441 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> {
2356 public: 2442 public:
2357 LAllocate(LOperand* context, 2443 LAllocate(LOperand* context,
2358 LOperand* size, 2444 LOperand* size,
2359 LOperand* temp1, 2445 LOperand* temp1,
2360 LOperand* temp2) { 2446 LOperand* temp2) {
2361 inputs_[0] = context; 2447 inputs_[0] = context;
2362 inputs_[1] = size; 2448 inputs_[1] = size;
2363 temps_[0] = temp1; 2449 temps_[0] = temp1;
2364 temps_[1] = temp2; 2450 temps_[1] = temp2;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 public: 2645 public:
2560 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2646 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2561 : LChunkBuilderBase(graph->zone()), 2647 : LChunkBuilderBase(graph->zone()),
2562 chunk_(NULL), 2648 chunk_(NULL),
2563 info_(info), 2649 info_(info),
2564 graph_(graph), 2650 graph_(graph),
2565 status_(UNUSED), 2651 status_(UNUSED),
2566 current_instruction_(NULL), 2652 current_instruction_(NULL),
2567 current_block_(NULL), 2653 current_block_(NULL),
2568 next_block_(NULL), 2654 next_block_(NULL),
2569 allocator_(allocator), 2655 allocator_(allocator) { }
2570 instruction_pending_deoptimization_environment_(NULL),
2571 pending_deoptimization_ast_id_(BailoutId::None()) { }
2572 2656
2573 // Build the sequence for the graph. 2657 // Build the sequence for the graph.
2574 LPlatformChunk* Build(); 2658 LPlatformChunk* Build();
2575 2659
2576 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); 2660 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2577 2661
2578 // Declare methods that deal with the individual node types. 2662 // Declare methods that deal with the individual node types.
2579 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2663 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2580 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2664 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2581 #undef DECLARE_DO 2665 #undef DECLARE_DO
2582 2666
2583 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2667 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
2584 2668
2585 static bool HasMagicNumberForDivisor(int32_t divisor); 2669 static bool HasMagicNumberForDivisor(int32_t divisor);
2586 2670
2587 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2671 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2588 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2672 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2589 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2673 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
2590 LInstruction* DoMathLog(HUnaryMathOperation* instr); 2674 LInstruction* DoMathLog(HUnaryMathOperation* instr);
2591 LInstruction* DoMathExp(HUnaryMathOperation* instr); 2675 LInstruction* DoMathExp(HUnaryMathOperation* instr);
2592 LInstruction* DoMathSqrt(HUnaryMathOperation* instr); 2676 LInstruction* DoMathSqrt(HUnaryMathOperation* instr);
2593 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr); 2677 LInstruction* DoMathPowHalf(HUnaryMathOperation* instr);
2594 LInstruction* DoMathClz32(HUnaryMathOperation* instr); 2678 LInstruction* DoMathClz32(HUnaryMathOperation* instr);
2679 LInstruction* DoDivByPowerOf2I(HDiv* instr);
2680 LInstruction* DoDivByConstI(HDiv* instr);
2681 LInstruction* DoDivI(HBinaryOperation* instr);
2682 LInstruction* DoModByPowerOf2I(HMod* instr);
2683 LInstruction* DoModByConstI(HMod* instr);
2684 LInstruction* DoModI(HMod* instr);
2685 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2686 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2595 2687
2596 private: 2688 private:
2597 enum Status { 2689 enum Status {
2598 UNUSED, 2690 UNUSED,
2599 BUILDING, 2691 BUILDING,
2600 DONE, 2692 DONE,
2601 ABORTED 2693 ABORTED
2602 }; 2694 };
2603 2695
2604 LPlatformChunk* chunk() const { return chunk_; } 2696 LPlatformChunk* chunk() const { return chunk_; }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 HBinaryOperation* instr); 2788 HBinaryOperation* instr);
2697 2789
2698 LPlatformChunk* chunk_; 2790 LPlatformChunk* chunk_;
2699 CompilationInfo* info_; 2791 CompilationInfo* info_;
2700 HGraph* const graph_; 2792 HGraph* const graph_;
2701 Status status_; 2793 Status status_;
2702 HInstruction* current_instruction_; 2794 HInstruction* current_instruction_;
2703 HBasicBlock* current_block_; 2795 HBasicBlock* current_block_;
2704 HBasicBlock* next_block_; 2796 HBasicBlock* next_block_;
2705 LAllocator* allocator_; 2797 LAllocator* allocator_;
2706 LInstruction* instruction_pending_deoptimization_environment_;
2707 BailoutId pending_deoptimization_ast_id_;
2708 2798
2709 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2799 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2710 }; 2800 };
2711 2801
2712 #undef DECLARE_HYDROGEN_ACCESSOR 2802 #undef DECLARE_HYDROGEN_ACCESSOR
2713 #undef DECLARE_CONCRETE_INSTRUCTION 2803 #undef DECLARE_CONCRETE_INSTRUCTION
2714 2804
2715 } } // namespace v8::internal 2805 } } // namespace v8::internal
2716 2806
2717 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2807 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698