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

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

Issue 10382055: Array index computation dehoisting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. 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
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1229 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1230 inputs_[0] = elements; 1230 inputs_[0] = elements;
1231 inputs_[1] = key; 1231 inputs_[1] = key;
1232 } 1232 }
1233 1233
1234 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1234 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1235 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1235 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1236 1236
1237 LOperand* elements() { return inputs_[0]; } 1237 LOperand* elements() { return inputs_[0]; }
1238 LOperand* key() { return inputs_[1]; } 1238 LOperand* key() { return inputs_[1]; }
1239 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1239 }; 1240 };
1240 1241
1241 1242
1242 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { 1243 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1243 public: 1244 public:
1244 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) { 1245 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) {
1245 inputs_[0] = elements; 1246 inputs_[0] = elements;
1246 inputs_[1] = key; 1247 inputs_[1] = key;
1247 } 1248 }
1248 1249
1249 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, 1250 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1250 "load-keyed-fast-double-element") 1251 "load-keyed-fast-double-element")
1251 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) 1252 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1252 1253
1253 LOperand* elements() { return inputs_[0]; } 1254 LOperand* elements() { return inputs_[0]; }
1254 LOperand* key() { return inputs_[1]; } 1255 LOperand* key() { return inputs_[1]; }
1256 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1255 }; 1257 };
1256 1258
1257 1259
1258 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { 1260 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1259 public: 1261 public:
1260 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, 1262 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) {
1261 LOperand* key) {
1262 inputs_[0] = external_pointer; 1263 inputs_[0] = external_pointer;
1263 inputs_[1] = key; 1264 inputs_[1] = key;
1264 } 1265 }
1265 1266
1266 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, 1267 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1267 "load-keyed-specialized-array-element") 1268 "load-keyed-specialized-array-element")
1268 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1269 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1269 1270
1270 LOperand* external_pointer() { return inputs_[0]; } 1271 LOperand* external_pointer() { return inputs_[0]; }
1271 LOperand* key() { return inputs_[1]; } 1272 LOperand* key() { return inputs_[1]; }
1272 ElementsKind elements_kind() const { 1273 ElementsKind elements_kind() const {
1273 return hydrogen()->elements_kind(); 1274 return hydrogen()->elements_kind();
1274 } 1275 }
1276 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1275 }; 1277 };
1276 1278
1277 1279
1278 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { 1280 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> {
1279 public: 1281 public:
1280 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1282 LLoadKeyedGeneric(LOperand* obj, LOperand* key) {
1281 inputs_[0] = obj; 1283 inputs_[0] = obj;
1282 inputs_[1] = key; 1284 inputs_[1] = key;
1283 } 1285 }
1284 1286
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 1735
1734 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1736 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1735 "store-keyed-fast-element") 1737 "store-keyed-fast-element")
1736 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1738 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1737 1739
1738 virtual void PrintDataTo(StringStream* stream); 1740 virtual void PrintDataTo(StringStream* stream);
1739 1741
1740 LOperand* object() { return inputs_[0]; } 1742 LOperand* object() { return inputs_[0]; }
1741 LOperand* key() { return inputs_[1]; } 1743 LOperand* key() { return inputs_[1]; }
1742 LOperand* value() { return inputs_[2]; } 1744 LOperand* value() { return inputs_[2]; }
1745 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1743 }; 1746 };
1744 1747
1745 1748
1746 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { 1749 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1747 public: 1750 public:
1748 LStoreKeyedFastDoubleElement(LOperand* elements, 1751 LStoreKeyedFastDoubleElement(LOperand* elements,
1749 LOperand* key, 1752 LOperand* key,
1750 LOperand* val) { 1753 LOperand* val) {
1751 inputs_[0] = elements; 1754 inputs_[0] = elements;
1752 inputs_[1] = key; 1755 inputs_[1] = key;
1753 inputs_[2] = val; 1756 inputs_[2] = val;
1754 } 1757 }
1755 1758
1756 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, 1759 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1757 "store-keyed-fast-double-element") 1760 "store-keyed-fast-double-element")
1758 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) 1761 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1759 1762
1760 virtual void PrintDataTo(StringStream* stream); 1763 virtual void PrintDataTo(StringStream* stream);
1761 1764
1762 LOperand* elements() { return inputs_[0]; } 1765 LOperand* elements() { return inputs_[0]; }
1763 LOperand* key() { return inputs_[1]; } 1766 LOperand* key() { return inputs_[1]; }
1764 LOperand* value() { return inputs_[2]; } 1767 LOperand* value() { return inputs_[2]; }
1768 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1765 1769
1766 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 1770 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1767 }; 1771 };
1768 1772
1769 1773
1770 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { 1774 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> {
1771 public: 1775 public:
1772 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) { 1776 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) {
1773 inputs_[0] = obj; 1777 inputs_[0] = obj;
1774 inputs_[1] = key; 1778 inputs_[1] = key;
(...skipping 24 matching lines...) Expand all
1799 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, 1803 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1800 "store-keyed-specialized-array-element") 1804 "store-keyed-specialized-array-element")
1801 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) 1805 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1802 1806
1803 LOperand* external_pointer() { return inputs_[0]; } 1807 LOperand* external_pointer() { return inputs_[0]; }
1804 LOperand* key() { return inputs_[1]; } 1808 LOperand* key() { return inputs_[1]; }
1805 LOperand* value() { return inputs_[2]; } 1809 LOperand* value() { return inputs_[2]; }
1806 ElementsKind elements_kind() const { 1810 ElementsKind elements_kind() const {
1807 return hydrogen()->elements_kind(); 1811 return hydrogen()->elements_kind();
1808 } 1812 }
1813 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1809 }; 1814 };
1810 1815
1811 1816
1812 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { 1817 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1813 public: 1818 public:
1814 LTransitionElementsKind(LOperand* object, 1819 LTransitionElementsKind(LOperand* object,
1815 LOperand* new_map_temp, 1820 LOperand* new_map_temp,
1816 LOperand* temp_reg) { 1821 LOperand* temp_reg) {
1817 inputs_[0] = object; 1822 inputs_[0] = object;
1818 temps_[0] = new_map_temp; 1823 temps_[0] = new_map_temp;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 2432
2428 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2433 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2429 }; 2434 };
2430 2435
2431 #undef DECLARE_HYDROGEN_ACCESSOR 2436 #undef DECLARE_HYDROGEN_ACCESSOR
2432 #undef DECLARE_CONCRETE_INSTRUCTION 2437 #undef DECLARE_CONCRETE_INSTRUCTION
2433 2438
2434 } } // namespace v8::internal 2439 } } // namespace v8::internal
2435 2440
2436 #endif // V8_ARM_LITHIUM_ARM_H_ 2441 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698