OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 V(IsUndetectableAndBranch) \ | 118 V(IsUndetectableAndBranch) \ |
119 V(JSArrayLength) \ | 119 V(JSArrayLength) \ |
120 V(Label) \ | 120 V(Label) \ |
121 V(LazyBailout) \ | 121 V(LazyBailout) \ |
122 V(LoadContextSlot) \ | 122 V(LoadContextSlot) \ |
123 V(LoadElements) \ | 123 V(LoadElements) \ |
124 V(LoadExternalArrayPointer) \ | 124 V(LoadExternalArrayPointer) \ |
125 V(LoadFunctionPrototype) \ | 125 V(LoadFunctionPrototype) \ |
126 V(LoadGlobalCell) \ | 126 V(LoadGlobalCell) \ |
127 V(LoadGlobalGeneric) \ | 127 V(LoadGlobalGeneric) \ |
128 V(LoadKeyedFastDoubleElement) \ | 128 V(LoadKeyed) \ |
129 V(LoadKeyedFastElement) \ | |
130 V(LoadKeyedGeneric) \ | 129 V(LoadKeyedGeneric) \ |
131 V(LoadKeyedSpecializedArrayElement) \ | |
132 V(LoadNamedField) \ | 130 V(LoadNamedField) \ |
133 V(LoadNamedFieldPolymorphic) \ | 131 V(LoadNamedFieldPolymorphic) \ |
134 V(LoadNamedGeneric) \ | 132 V(LoadNamedGeneric) \ |
135 V(MapEnumLength) \ | 133 V(MapEnumLength) \ |
136 V(MathMinMax) \ | 134 V(MathMinMax) \ |
137 V(ModI) \ | 135 V(ModI) \ |
138 V(MulI) \ | 136 V(MulI) \ |
139 V(NumberTagD) \ | 137 V(NumberTagD) \ |
140 V(NumberTagI) \ | 138 V(NumberTagI) \ |
141 V(NumberTagU) \ | 139 V(NumberTagU) \ |
142 V(NumberUntagD) \ | 140 V(NumberUntagD) \ |
143 V(ObjectLiteral) \ | 141 V(ObjectLiteral) \ |
144 V(OsrEntry) \ | 142 V(OsrEntry) \ |
145 V(OuterContext) \ | 143 V(OuterContext) \ |
146 V(Parameter) \ | 144 V(Parameter) \ |
147 V(Power) \ | 145 V(Power) \ |
148 V(PushArgument) \ | 146 V(PushArgument) \ |
149 V(Random) \ | 147 V(Random) \ |
150 V(RegExpLiteral) \ | 148 V(RegExpLiteral) \ |
151 V(Return) \ | 149 V(Return) \ |
152 V(ShiftI) \ | 150 V(ShiftI) \ |
153 V(SmiTag) \ | 151 V(SmiTag) \ |
154 V(SmiUntag) \ | 152 V(SmiUntag) \ |
155 V(StackCheck) \ | 153 V(StackCheck) \ |
156 V(StoreContextSlot) \ | 154 V(StoreContextSlot) \ |
157 V(StoreGlobalCell) \ | 155 V(StoreGlobalCell) \ |
158 V(StoreGlobalGeneric) \ | 156 V(StoreGlobalGeneric) \ |
159 V(StoreKeyedFastDoubleElement) \ | 157 V(StoreKeyed) \ |
160 V(StoreKeyedFastElement) \ | |
161 V(StoreKeyedGeneric) \ | 158 V(StoreKeyedGeneric) \ |
162 V(StoreKeyedSpecializedArrayElement) \ | |
163 V(StoreNamedField) \ | 159 V(StoreNamedField) \ |
164 V(StoreNamedGeneric) \ | 160 V(StoreNamedGeneric) \ |
165 V(StringAdd) \ | 161 V(StringAdd) \ |
166 V(StringCharCodeAt) \ | 162 V(StringCharCodeAt) \ |
167 V(StringCharFromCode) \ | 163 V(StringCharFromCode) \ |
168 V(StringCompareAndBranch) \ | 164 V(StringCompareAndBranch) \ |
169 V(StringLength) \ | 165 V(StringLength) \ |
170 V(SubI) \ | 166 V(SubI) \ |
171 V(TaggedToI) \ | 167 V(TaggedToI) \ |
172 V(ThisFunction) \ | 168 V(ThisFunction) \ |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 inputs_[0] = object; | 1326 inputs_[0] = object; |
1331 } | 1327 } |
1332 | 1328 |
1333 LOperand* object() { return inputs_[0]; } | 1329 LOperand* object() { return inputs_[0]; } |
1334 | 1330 |
1335 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, | 1331 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, |
1336 "load-external-array-pointer") | 1332 "load-external-array-pointer") |
1337 }; | 1333 }; |
1338 | 1334 |
1339 | 1335 |
1340 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { | 1336 class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { |
1341 public: | 1337 public: |
1342 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { | 1338 LLoadKeyed(LOperand* elements, LOperand* key) { |
1343 inputs_[0] = elements; | 1339 inputs_[0] = elements; |
1344 inputs_[1] = key; | 1340 inputs_[1] = key; |
1345 } | 1341 } |
1346 | 1342 |
1347 LOperand* elements() { return inputs_[0]; } | 1343 LOperand* elements() { |
| 1344 ASSERT(!is_external()); |
| 1345 return inputs_[0]; |
| 1346 } |
| 1347 LOperand* external_pointer() { |
| 1348 ASSERT(is_external()); |
| 1349 return inputs_[0]; |
| 1350 } |
1348 LOperand* key() { return inputs_[1]; } | 1351 LOperand* key() { return inputs_[1]; } |
| 1352 ElementsKind elements_kind() const { |
| 1353 return hydrogen()->elements_kind(); |
| 1354 } |
| 1355 bool is_external() const { |
| 1356 return hydrogen()->is_external(); |
| 1357 } |
1349 | 1358 |
1350 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") | 1359 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1351 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) | 1360 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1352 | 1361 |
1353 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1362 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1354 }; | 1363 }; |
1355 | 1364 |
1356 | |
1357 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { | |
1358 public: | |
1359 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { | |
1360 inputs_[0] = elements; | |
1361 inputs_[1] = key; | |
1362 } | |
1363 | |
1364 LOperand* elements() { return inputs_[0]; } | |
1365 LOperand* key() { return inputs_[1]; } | |
1366 | |
1367 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, | |
1368 "load-keyed-fast-double-element") | |
1369 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) | |
1370 | |
1371 uint32_t additional_index() const { return hydrogen()->index_offset(); } | |
1372 }; | |
1373 | |
1374 | |
1375 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { | |
1376 public: | |
1377 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, | |
1378 LOperand* key) { | |
1379 inputs_[0] = external_pointer; | |
1380 inputs_[1] = key; | |
1381 } | |
1382 | |
1383 LOperand* external_pointer() { return inputs_[0]; } | |
1384 LOperand* key() { return inputs_[1]; } | |
1385 | |
1386 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, | |
1387 "load-keyed-specialized-array-element") | |
1388 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) | |
1389 | |
1390 ElementsKind elements_kind() const { | |
1391 return hydrogen()->elements_kind(); | |
1392 } | |
1393 uint32_t additional_index() const { return hydrogen()->index_offset(); } | |
1394 }; | |
1395 | |
1396 | 1365 |
1397 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { | 1366 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { |
1398 public: | 1367 public: |
1399 LLoadKeyedGeneric(LOperand* object, LOperand* key) { | 1368 LLoadKeyedGeneric(LOperand* object, LOperand* key) { |
1400 inputs_[0] = object; | 1369 inputs_[0] = object; |
1401 inputs_[1] = key; | 1370 inputs_[1] = key; |
1402 } | 1371 } |
1403 | 1372 |
1404 LOperand* object() { return inputs_[0]; } | 1373 LOperand* object() { return inputs_[0]; } |
1405 LOperand* key() { return inputs_[1]; } | 1374 LOperand* key() { return inputs_[1]; } |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 1865 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
1897 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 1866 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
1898 | 1867 |
1899 virtual void PrintDataTo(StringStream* stream); | 1868 virtual void PrintDataTo(StringStream* stream); |
1900 | 1869 |
1901 Handle<Object> name() const { return hydrogen()->name(); } | 1870 Handle<Object> name() const { return hydrogen()->name(); } |
1902 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1871 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
1903 }; | 1872 }; |
1904 | 1873 |
1905 | 1874 |
1906 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { | 1875 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { |
1907 public: | 1876 public: |
1908 LStoreKeyedFastElement(LOperand* object, LOperand* key, LOperand* value) { | 1877 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { |
1909 inputs_[0] = object; | 1878 inputs_[0] = object; |
1910 inputs_[1] = key; | 1879 inputs_[1] = key; |
1911 inputs_[2] = value; | 1880 inputs_[2] = value; |
1912 } | 1881 } |
1913 | 1882 |
1914 LOperand* object() { return inputs_[0]; } | 1883 bool is_external() const { return hydrogen()->is_external(); } |
| 1884 LOperand* object() { |
| 1885 ASSERT(!is_external()); |
| 1886 return inputs_[0]; |
| 1887 } |
| 1888 LOperand* external_pointer() { |
| 1889 ASSERT(is_external()); |
| 1890 return inputs_[0]; |
| 1891 } |
1915 LOperand* key() { return inputs_[1]; } | 1892 LOperand* key() { return inputs_[1]; } |
1916 LOperand* value() { return inputs_[2]; } | 1893 LOperand* value() { return inputs_[2]; } |
| 1894 ElementsKind elements_kind() const { |
| 1895 return hydrogen()->elements_kind(); |
| 1896 } |
1917 | 1897 |
1918 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, | 1898 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") |
1919 "store-keyed-fast-element") | 1899 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) |
1920 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) | |
1921 | 1900 |
1922 virtual void PrintDataTo(StringStream* stream); | 1901 virtual void PrintDataTo(StringStream* stream); |
1923 | |
1924 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1902 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1925 }; | |
1926 | |
1927 | |
1928 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { | |
1929 public: | |
1930 LStoreKeyedFastDoubleElement(LOperand* elements, | |
1931 LOperand* key, | |
1932 LOperand* value) { | |
1933 inputs_[0] = elements; | |
1934 inputs_[1] = key; | |
1935 inputs_[2] = value; | |
1936 } | |
1937 | |
1938 LOperand* elements() { return inputs_[0]; } | |
1939 LOperand* key() { return inputs_[1]; } | |
1940 LOperand* value() { return inputs_[2]; } | |
1941 | |
1942 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, | |
1943 "store-keyed-fast-double-element") | |
1944 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) | |
1945 | |
1946 virtual void PrintDataTo(StringStream* stream); | |
1947 | |
1948 uint32_t additional_index() const { return hydrogen()->index_offset(); } | |
1949 | |
1950 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } | 1903 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } |
1951 }; | 1904 }; |
1952 | 1905 |
1953 | 1906 |
1954 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { | 1907 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { |
1955 public: | 1908 public: |
1956 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { | 1909 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { |
1957 inputs_[0] = obj; | 1910 inputs_[0] = obj; |
1958 inputs_[1] = key; | 1911 inputs_[1] = key; |
1959 inputs_[2] = value; | 1912 inputs_[2] = value; |
1960 } | 1913 } |
1961 | 1914 |
1962 LOperand* object() { return inputs_[0]; } | 1915 LOperand* object() { return inputs_[0]; } |
1963 LOperand* key() { return inputs_[1]; } | 1916 LOperand* key() { return inputs_[1]; } |
1964 LOperand* value() { return inputs_[2]; } | 1917 LOperand* value() { return inputs_[2]; } |
1965 | 1918 |
1966 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | 1919 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
1967 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) | 1920 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) |
1968 | 1921 |
1969 virtual void PrintDataTo(StringStream* stream); | 1922 virtual void PrintDataTo(StringStream* stream); |
1970 | 1923 |
1971 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } | 1924 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } |
1972 }; | 1925 }; |
1973 | 1926 |
1974 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { | |
1975 public: | |
1976 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, | |
1977 LOperand* key, | |
1978 LOperand* value) { | |
1979 inputs_[0] = external_pointer; | |
1980 inputs_[1] = key; | |
1981 inputs_[2] = value; | |
1982 } | |
1983 | |
1984 LOperand* external_pointer() { return inputs_[0]; } | |
1985 LOperand* key() { return inputs_[1]; } | |
1986 LOperand* value() { return inputs_[2]; } | |
1987 | |
1988 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, | |
1989 "store-keyed-specialized-array-element") | |
1990 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) | |
1991 | |
1992 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); } | |
1993 uint32_t additional_index() const { return hydrogen()->index_offset(); } | |
1994 }; | |
1995 | |
1996 | 1927 |
1997 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { | 1928 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { |
1998 public: | 1929 public: |
1999 LTransitionElementsKind(LOperand* object, | 1930 LTransitionElementsKind(LOperand* object, |
2000 LOperand* new_map_temp, | 1931 LOperand* new_map_temp, |
2001 LOperand* temp) { | 1932 LOperand* temp) { |
2002 inputs_[0] = object; | 1933 inputs_[0] = object; |
2003 temps_[0] = new_map_temp; | 1934 temps_[0] = new_map_temp; |
2004 temps_[1] = temp; | 1935 temps_[1] = temp; |
2005 } | 1936 } |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2584 | 2515 |
2585 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2516 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2586 }; | 2517 }; |
2587 | 2518 |
2588 #undef DECLARE_HYDROGEN_ACCESSOR | 2519 #undef DECLARE_HYDROGEN_ACCESSOR |
2589 #undef DECLARE_CONCRETE_INSTRUCTION | 2520 #undef DECLARE_CONCRETE_INSTRUCTION |
2590 | 2521 |
2591 } } // namespace v8::internal | 2522 } } // namespace v8::internal |
2592 | 2523 |
2593 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2524 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |