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

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

Issue 11369110: MIPS: Consolidated all the key store/load classes in the Hydrogen and Lithium space into just two: … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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() { return inputs_[0]; }
1348 LOperand* key() { return inputs_[1]; } 1344 LOperand* key() { return inputs_[1]; }
1345 ElementsKind elements_kind() const {
1346 return hydrogen()->elements_kind();
1347 }
1348 bool is_external() const {
1349 return hydrogen()->is_external();
1350 }
1349 1351
1350 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1352 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1351 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1353 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1352 1354
1353 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1355 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1354 }; 1356 };
1355 1357
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 1358
1397 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1359 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1398 public: 1360 public:
1399 LLoadKeyedGeneric(LOperand* object, LOperand* key) { 1361 LLoadKeyedGeneric(LOperand* object, LOperand* key) {
1400 inputs_[0] = object; 1362 inputs_[0] = object;
1401 inputs_[1] = key; 1363 inputs_[1] = key;
1402 } 1364 }
1403 1365
1404 LOperand* object() { return inputs_[0]; } 1366 LOperand* object() { return inputs_[0]; }
1405 LOperand* key() { return inputs_[1]; } 1367 LOperand* key() { return inputs_[1]; }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1858 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1897 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1859 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1898 1860
1899 virtual void PrintDataTo(StringStream* stream); 1861 virtual void PrintDataTo(StringStream* stream);
1900 1862
1901 Handle<Object> name() const { return hydrogen()->name(); } 1863 Handle<Object> name() const { return hydrogen()->name(); }
1902 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1864 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1903 }; 1865 };
1904 1866
1905 1867
1906 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1868 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> {
1907 public: 1869 public:
1908 LStoreKeyedFastElement(LOperand* object, LOperand* key, LOperand* value) { 1870 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
1909 inputs_[0] = object; 1871 inputs_[0] = object;
1910 inputs_[1] = key; 1872 inputs_[1] = key;
1911 inputs_[2] = value; 1873 inputs_[2] = value;
1912 } 1874 }
1913 1875
1914 LOperand* object() { return inputs_[0]; } 1876 bool is_external() const { return hydrogen()->is_external(); }
1877 LOperand* elements() { return inputs_[0]; }
1915 LOperand* key() { return inputs_[1]; } 1878 LOperand* key() { return inputs_[1]; }
1916 LOperand* value() { return inputs_[2]; } 1879 LOperand* value() { return inputs_[2]; }
1880 ElementsKind elements_kind() const {
1881 return hydrogen()->elements_kind();
1882 }
1917 1883
1918 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1884 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
1919 "store-keyed-fast-element") 1885 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
1920 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1921 1886
1922 virtual void PrintDataTo(StringStream* stream); 1887 virtual void PrintDataTo(StringStream* stream);
1923 1888 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1924 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1889 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1925 }; 1890 };
1926 1891
1927 1892
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(); }
1951 };
1952
1953
1954 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1893 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1955 public: 1894 public:
1956 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { 1895 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) {
1957 inputs_[0] = obj; 1896 inputs_[0] = obj;
1958 inputs_[1] = key; 1897 inputs_[1] = key;
1959 inputs_[2] = value; 1898 inputs_[2] = value;
1960 } 1899 }
1961 1900
1962 LOperand* object() { return inputs_[0]; } 1901 LOperand* object() { return inputs_[0]; }
1963 LOperand* key() { return inputs_[1]; } 1902 LOperand* key() { return inputs_[1]; }
1964 LOperand* value() { return inputs_[2]; } 1903 LOperand* value() { return inputs_[2]; }
1965 1904
1966 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1905 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1967 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 1906 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
1968 1907
1969 virtual void PrintDataTo(StringStream* stream); 1908 virtual void PrintDataTo(StringStream* stream);
1970 1909
1971 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1910 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1972 }; 1911 };
1973 1912
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 1913
1997 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { 1914 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1998 public: 1915 public:
1999 LTransitionElementsKind(LOperand* object, 1916 LTransitionElementsKind(LOperand* object,
2000 LOperand* new_map_temp, 1917 LOperand* new_map_temp,
2001 LOperand* temp) { 1918 LOperand* temp) {
2002 inputs_[0] = object; 1919 inputs_[0] = object;
2003 temps_[0] = new_map_temp; 1920 temps_[0] = new_map_temp;
2004 temps_[1] = temp; 1921 temps_[1] = temp;
2005 } 1922 }
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 2501
2585 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2502 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2586 }; 2503 };
2587 2504
2588 #undef DECLARE_HYDROGEN_ACCESSOR 2505 #undef DECLARE_HYDROGEN_ACCESSOR
2589 #undef DECLARE_CONCRETE_INSTRUCTION 2506 #undef DECLARE_CONCRETE_INSTRUCTION
2590 2507
2591 } } // namespace v8::internal 2508 } } // namespace v8::internal
2592 2509
2593 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2510 #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