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

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

Issue 11238016: Consolidated all the key store/load classes in the Hydrogen and Lithium (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Oops, missed a section of commented-out code Created 8 years, 2 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 V(IsUndetectableAndBranch) \ 119 V(IsUndetectableAndBranch) \
120 V(JSArrayLength) \ 120 V(JSArrayLength) \
121 V(Label) \ 121 V(Label) \
122 V(LazyBailout) \ 122 V(LazyBailout) \
123 V(LoadContextSlot) \ 123 V(LoadContextSlot) \
124 V(LoadElements) \ 124 V(LoadElements) \
125 V(LoadExternalArrayPointer) \ 125 V(LoadExternalArrayPointer) \
126 V(LoadFunctionPrototype) \ 126 V(LoadFunctionPrototype) \
127 V(LoadGlobalCell) \ 127 V(LoadGlobalCell) \
128 V(LoadGlobalGeneric) \ 128 V(LoadGlobalGeneric) \
129 V(LoadKeyedFastDoubleElement) \ 129 V(LoadKeyed) \
130 V(LoadKeyedFastElement) \
131 V(LoadKeyedGeneric) \ 130 V(LoadKeyedGeneric) \
132 V(LoadKeyedSpecializedArrayElement) \
133 V(LoadNamedField) \ 131 V(LoadNamedField) \
134 V(LoadNamedFieldPolymorphic) \ 132 V(LoadNamedFieldPolymorphic) \
135 V(LoadNamedGeneric) \ 133 V(LoadNamedGeneric) \
136 V(MathFloorOfDiv) \ 134 V(MathFloorOfDiv) \
137 V(MathMinMax) \ 135 V(MathMinMax) \
138 V(ModI) \ 136 V(ModI) \
139 V(MulI) \ 137 V(MulI) \
140 V(NumberTagD) \ 138 V(NumberTagD) \
141 V(NumberTagI) \ 139 V(NumberTagI) \
142 V(NumberTagU) \ 140 V(NumberTagU) \
143 V(NumberUntagD) \ 141 V(NumberUntagD) \
144 V(ObjectLiteral) \ 142 V(ObjectLiteral) \
145 V(OsrEntry) \ 143 V(OsrEntry) \
146 V(OuterContext) \ 144 V(OuterContext) \
147 V(Parameter) \ 145 V(Parameter) \
148 V(Power) \ 146 V(Power) \
149 V(PushArgument) \ 147 V(PushArgument) \
150 V(Random) \ 148 V(Random) \
151 V(RegExpLiteral) \ 149 V(RegExpLiteral) \
152 V(Return) \ 150 V(Return) \
153 V(ShiftI) \ 151 V(ShiftI) \
154 V(SmiTag) \ 152 V(SmiTag) \
155 V(SmiUntag) \ 153 V(SmiUntag) \
156 V(StackCheck) \ 154 V(StackCheck) \
157 V(StoreContextSlot) \ 155 V(StoreContextSlot) \
158 V(StoreGlobalCell) \ 156 V(StoreGlobalCell) \
159 V(StoreGlobalGeneric) \ 157 V(StoreGlobalGeneric) \
160 V(StoreKeyedFastDoubleElement) \ 158 V(StoreKeyed) \
161 V(StoreKeyedFastElement) \
162 V(StoreKeyedGeneric) \ 159 V(StoreKeyedGeneric) \
163 V(StoreKeyedSpecializedArrayElement) \
164 V(StoreNamedField) \ 160 V(StoreNamedField) \
165 V(StoreNamedGeneric) \ 161 V(StoreNamedGeneric) \
166 V(StringAdd) \ 162 V(StringAdd) \
167 V(StringCharCodeAt) \ 163 V(StringCharCodeAt) \
168 V(StringCharFromCode) \ 164 V(StringCharFromCode) \
169 V(StringCompareAndBranch) \ 165 V(StringCompareAndBranch) \
170 V(StringLength) \ 166 V(StringLength) \
171 V(SubI) \ 167 V(SubI) \
172 V(TaggedToI) \ 168 V(TaggedToI) \
173 V(ThisFunction) \ 169 V(ThisFunction) \
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 inputs_[0] = object; 1342 inputs_[0] = object;
1347 } 1343 }
1348 1344
1349 LOperand* object() { return inputs_[0]; } 1345 LOperand* object() { return inputs_[0]; }
1350 1346
1351 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer, 1347 DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer,
1352 "load-external-array-pointer") 1348 "load-external-array-pointer")
1353 }; 1349 };
1354 1350
1355 1351
1356 class LLoadKeyedFastElement: public LTemplateInstruction<1, 2, 0> { 1352 class LLoadKeyed: public LTemplateInstruction<1, 2, 0> {
1357 public: 1353 public:
1358 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1354 LLoadKeyed(LOperand* elements, LOperand* key) {
1359 inputs_[0] = elements; 1355 inputs_[0] = elements;
1360 inputs_[1] = key; 1356 inputs_[1] = key;
1361 } 1357 }
1362 1358
1363 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1359 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1364 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1360 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1365 1361
1366 LOperand* elements() { return inputs_[0]; } 1362 bool is_external() const {
1363 return hydrogen()->is_external();
1364 }
1365 LOperand* object() { return inputs_[0]; }
danno 2012/10/24 11:42:43 elements?
mvstanton 2012/10/24 18:24:21 Done.
1367 LOperand* key() { return inputs_[1]; } 1366 LOperand* key() { return inputs_[1]; }
1368 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1367 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1368 ElementsKind elements_kind() const {
1369 return hydrogen()->elements_kind();
1370 }
1369 }; 1371 };
1370 1372
1371 1373
1372 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1373 public:
1374 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) {
1375 inputs_[0] = elements;
1376 inputs_[1] = key;
1377 }
1378
1379 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1380 "load-keyed-fast-double-element")
1381 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1382
1383 LOperand* elements() { return inputs_[0]; }
1384 LOperand* key() { return inputs_[1]; }
1385 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1386 };
1387
1388
1389 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1390 public:
1391 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) {
1392 inputs_[0] = external_pointer;
1393 inputs_[1] = key;
1394 }
1395
1396 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1397 "load-keyed-specialized-array-element")
1398 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1399
1400 LOperand* external_pointer() { return inputs_[0]; }
1401 LOperand* key() { return inputs_[1]; }
1402 ElementsKind elements_kind() const {
1403 return hydrogen()->elements_kind();
1404 }
1405 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1406 };
1407
1408
1409 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1374 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1410 public: 1375 public:
1411 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1376 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1412 inputs_[0] = obj; 1377 inputs_[0] = obj;
1413 inputs_[1] = key; 1378 inputs_[1] = key;
1414 } 1379 }
1415 1380
1416 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1381 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1417 1382
1418 LOperand* object() { return inputs_[0]; } 1383 LOperand* object() { return inputs_[0]; }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1857 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1893 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1858 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1894 1859
1895 virtual void PrintDataTo(StringStream* stream); 1860 virtual void PrintDataTo(StringStream* stream);
1896 1861
1897 Handle<Object> name() const { return hydrogen()->name(); } 1862 Handle<Object> name() const { return hydrogen()->name(); }
1898 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1863 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1899 }; 1864 };
1900 1865
1901 1866
1902 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1867 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> {
1903 public: 1868 public:
1904 LStoreKeyedFastElement(LOperand* object, LOperand* key, LOperand* value) { 1869 LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) {
1905 inputs_[0] = object; 1870 inputs_[0] = object;
1906 inputs_[1] = key; 1871 inputs_[1] = key;
1907 inputs_[2] = value; 1872 inputs_[2] = value;
1908 } 1873 }
1909 1874
1875 bool is_external() const { return hydrogen()->is_external(); }
1910 LOperand* object() { return inputs_[0]; } 1876 LOperand* object() { return inputs_[0]; }
1911 LOperand* key() { return inputs_[1]; } 1877 LOperand* key() { return inputs_[1]; }
1912 LOperand* value() { return inputs_[2]; } 1878 LOperand* value() { return inputs_[2]; }
1879 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
1913 1880
1914 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1881 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
1915 "store-keyed-fast-element") 1882 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
1916 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1917 1883
1918 virtual void PrintDataTo(StringStream* stream); 1884 virtual void PrintDataTo(StringStream* stream);
1919
1920 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1921 };
1922
1923
1924 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1925 public:
1926 LStoreKeyedFastDoubleElement(LOperand* elements,
1927 LOperand* key,
1928 LOperand* value) {
1929 inputs_[0] = elements;
1930 inputs_[1] = key;
1931 inputs_[2] = value;
1932 }
1933
1934 LOperand* elements() { return inputs_[0]; }
1935 LOperand* key() { return inputs_[1]; }
1936 LOperand* value() { return inputs_[2]; }
1937
1938 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1939 "store-keyed-fast-double-element")
1940 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1941
1942 virtual void PrintDataTo(StringStream* stream);
1943
1944 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 1885 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1945 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1886 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1946 }; 1887 };
1947 1888
1948 1889
1949 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> {
1950 public:
1951 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer,
1952 LOperand* key,
1953 LOperand* value) {
1954 inputs_[0] = external_pointer;
1955 inputs_[1] = key;
1956 inputs_[2] = value;
1957 }
1958
1959 LOperand* external_pointer() { return inputs_[0]; }
1960 LOperand* key() { return inputs_[1]; }
1961 LOperand* value() { return inputs_[2]; }
1962
1963 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1964 "store-keyed-specialized-array-element")
1965 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1966
1967 ElementsKind elements_kind() const { return hydrogen()->elements_kind(); }
1968 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1969 };
1970
1971
1972 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1890 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1973 public: 1891 public:
1974 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { 1892 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) {
1975 inputs_[0] = object; 1893 inputs_[0] = object;
1976 inputs_[1] = key; 1894 inputs_[1] = key;
1977 inputs_[2] = value; 1895 inputs_[2] = value;
1978 } 1896 }
1979 1897
1980 LOperand* object() { return inputs_[0]; } 1898 LOperand* object() { return inputs_[0]; }
1981 LOperand* key() { return inputs_[1]; } 1899 LOperand* key() { return inputs_[1]; }
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 2485
2568 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2486 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2569 }; 2487 };
2570 2488
2571 #undef DECLARE_HYDROGEN_ACCESSOR 2489 #undef DECLARE_HYDROGEN_ACCESSOR
2572 #undef DECLARE_CONCRETE_INSTRUCTION 2490 #undef DECLARE_CONCRETE_INSTRUCTION
2573 2491
2574 } } // namespace v8::int 2492 } } // namespace v8::int
2575 2493
2576 #endif // V8_X64_LITHIUM_X64_H_ 2494 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698