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

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

Issue 10442003: MIPS: Array index computation dehoisting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1194 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1195 inputs_[0] = elements; 1195 inputs_[0] = elements;
1196 inputs_[1] = key; 1196 inputs_[1] = key;
1197 } 1197 }
1198 1198
1199 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1199 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1200 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1200 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1201 1201
1202 LOperand* elements() { return inputs_[0]; } 1202 LOperand* elements() { return inputs_[0]; }
1203 LOperand* key() { return inputs_[1]; } 1203 LOperand* key() { return inputs_[1]; }
1204 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1204 }; 1205 };
1205 1206
1206 1207
1207 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { 1208 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1208 public: 1209 public:
1209 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { 1210 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) {
1210 inputs_[0] = elements; 1211 inputs_[0] = elements;
1211 inputs_[1] = key; 1212 inputs_[1] = key;
1212 } 1213 }
1213 1214
1214 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, 1215 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1215 "load-keyed-fast-double-element") 1216 "load-keyed-fast-double-element")
1216 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) 1217 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1217 1218
1218 LOperand* elements() { return inputs_[0]; } 1219 LOperand* elements() { return inputs_[0]; }
1219 LOperand* key() { return inputs_[1]; } 1220 LOperand* key() { return inputs_[1]; }
1221 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1220 }; 1222 };
1221 1223
1222 1224
1223 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { 1225 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1224 public: 1226 public:
1225 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, 1227 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) {
1226 LOperand* key) {
1227 inputs_[0] = external_pointer; 1228 inputs_[0] = external_pointer;
1228 inputs_[1] = key; 1229 inputs_[1] = key;
1229 } 1230 }
1230 1231
1231 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, 1232 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1232 "load-keyed-specialized-array-element") 1233 "load-keyed-specialized-array-element")
1233 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1234 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1234 1235
1235 LOperand* external_pointer() { return inputs_[0]; } 1236 LOperand* external_pointer() { return inputs_[0]; }
1236 LOperand* key() { return inputs_[1]; } 1237 LOperand* key() { return inputs_[1]; }
1237 ElementsKind elements_kind() const { 1238 ElementsKind elements_kind() const {
1238 return hydrogen()->elements_kind(); 1239 return hydrogen()->elements_kind();
1239 } 1240 }
1241 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1240 }; 1242 };
1241 1243
1242 1244
1243 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1245 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1244 public: 1246 public:
1245 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1247 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1246 inputs_[0] = obj; 1248 inputs_[0] = obj;
1247 inputs_[1] = key; 1249 inputs_[1] = key;
1248 } 1250 }
1249 1251
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 1700
1699 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1701 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1700 "store-keyed-fast-element") 1702 "store-keyed-fast-element")
1701 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1703 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1702 1704
1703 virtual void PrintDataTo(StringStream* stream); 1705 virtual void PrintDataTo(StringStream* stream);
1704 1706
1705 LOperand* object() { return inputs_[0]; } 1707 LOperand* object() { return inputs_[0]; }
1706 LOperand* key() { return inputs_[1]; } 1708 LOperand* key() { return inputs_[1]; }
1707 LOperand* value() { return inputs_[2]; } 1709 LOperand* value() { return inputs_[2]; }
1710 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1708 }; 1711 };
1709 1712
1710 1713
1711 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { 1714 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1712 public: 1715 public:
1713 LStoreKeyedFastDoubleElement(LOperand* elements, 1716 LStoreKeyedFastDoubleElement(LOperand* elements,
1714 LOperand* key, 1717 LOperand* key,
1715 LOperand* val) { 1718 LOperand* val) {
1716 inputs_[0] = elements; 1719 inputs_[0] = elements;
1717 inputs_[1] = key; 1720 inputs_[1] = key;
1718 inputs_[2] = val; 1721 inputs_[2] = val;
1719 } 1722 }
1720 1723
1721 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, 1724 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1722 "store-keyed-fast-double-element") 1725 "store-keyed-fast-double-element")
1723 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) 1726 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1724 1727
1725 virtual void PrintDataTo(StringStream* stream); 1728 virtual void PrintDataTo(StringStream* stream);
1726 1729
1727 LOperand* elements() { return inputs_[0]; } 1730 LOperand* elements() { return inputs_[0]; }
1728 LOperand* key() { return inputs_[1]; } 1731 LOperand* key() { return inputs_[1]; }
1729 LOperand* value() { return inputs_[2]; } 1732 LOperand* value() { return inputs_[2]; }
1733 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1730 1734
1731 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 1735 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1732 }; 1736 };
1733 1737
1734 1738
1735 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1739 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1736 public: 1740 public:
1737 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) { 1741 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) {
1738 inputs_[0] = obj; 1742 inputs_[0] = obj;
1739 inputs_[1] = key; 1743 inputs_[1] = key;
(...skipping 24 matching lines...) Expand all
1764 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, 1768 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1765 "store-keyed-specialized-array-element") 1769 "store-keyed-specialized-array-element")
1766 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) 1770 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1767 1771
1768 LOperand* external_pointer() { return inputs_[0]; } 1772 LOperand* external_pointer() { return inputs_[0]; }
1769 LOperand* key() { return inputs_[1]; } 1773 LOperand* key() { return inputs_[1]; }
1770 LOperand* value() { return inputs_[2]; } 1774 LOperand* value() { return inputs_[2]; }
1771 ElementsKind elements_kind() const { 1775 ElementsKind elements_kind() const {
1772 return hydrogen()->elements_kind(); 1776 return hydrogen()->elements_kind();
1773 } 1777 }
1778 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1774 }; 1779 };
1775 1780
1776 1781
1777 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { 1782 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1778 public: 1783 public:
1779 LTransitionElementsKind(LOperand* object, 1784 LTransitionElementsKind(LOperand* object,
1780 LOperand* new_map_temp, 1785 LOperand* new_map_temp,
1781 LOperand* temp_reg) { 1786 LOperand* temp_reg) {
1782 inputs_[0] = object; 1787 inputs_[0] = object;
1783 temps_[0] = new_map_temp; 1788 temps_[0] = new_map_temp;
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 2394
2390 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2395 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2391 }; 2396 };
2392 2397
2393 #undef DECLARE_HYDROGEN_ACCESSOR 2398 #undef DECLARE_HYDROGEN_ACCESSOR
2394 #undef DECLARE_CONCRETE_INSTRUCTION 2399 #undef DECLARE_CONCRETE_INSTRUCTION
2395 2400
2396 } } // namespace v8::internal 2401 } } // namespace v8::internal
2397 2402
2398 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2403 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« src/mips/lithium-codegen-mips.cc ('K') | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698