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/ia32/lithium-ia32.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 | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 LLoadKeyedFastElement(LOperand* elements, LOperand* key) { 1231 LLoadKeyedFastElement(LOperand* elements, LOperand* key) {
1232 inputs_[0] = elements; 1232 inputs_[0] = elements;
1233 inputs_[1] = key; 1233 inputs_[1] = key;
1234 } 1234 }
1235 1235
1236 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element") 1236 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement, "load-keyed-fast-element")
1237 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement) 1237 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastElement)
1238 1238
1239 LOperand* elements() { return inputs_[0]; } 1239 LOperand* elements() { return inputs_[0]; }
1240 LOperand* key() { return inputs_[1]; } 1240 LOperand* key() { return inputs_[1]; }
1241 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1241 }; 1242 };
1242 1243
1243 1244
1244 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> { 1245 class LLoadKeyedFastDoubleElement: public LTemplateInstruction<1, 2, 0> {
1245 public: 1246 public:
1246 LLoadKeyedFastDoubleElement(LOperand* elements, 1247 LLoadKeyedFastDoubleElement(LOperand* elements, LOperand* key) {
1247 LOperand* key) {
1248 inputs_[0] = elements; 1248 inputs_[0] = elements;
1249 inputs_[1] = key; 1249 inputs_[1] = key;
1250 } 1250 }
1251 1251
1252 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement, 1252 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement,
1253 "load-keyed-fast-double-element") 1253 "load-keyed-fast-double-element")
1254 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement) 1254 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedFastDoubleElement)
1255 1255
1256 LOperand* elements() { return inputs_[0]; } 1256 LOperand* elements() { return inputs_[0]; }
1257 LOperand* key() { return inputs_[1]; } 1257 LOperand* key() { return inputs_[1]; }
1258 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1258 }; 1259 };
1259 1260
1260 1261
1261 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> { 1262 class LLoadKeyedSpecializedArrayElement: public LTemplateInstruction<1, 2, 0> {
1262 public: 1263 public:
1263 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, 1264 LLoadKeyedSpecializedArrayElement(LOperand* external_pointer, LOperand* key) {
1264 LOperand* key) {
1265 inputs_[0] = external_pointer; 1265 inputs_[0] = external_pointer;
1266 inputs_[1] = key; 1266 inputs_[1] = key;
1267 } 1267 }
1268 1268
1269 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement, 1269 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement,
1270 "load-keyed-specialized-array-element") 1270 "load-keyed-specialized-array-element")
1271 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement) 1271 DECLARE_HYDROGEN_ACCESSOR(LoadKeyedSpecializedArrayElement)
1272 1272
1273 LOperand* external_pointer() { return inputs_[0]; } 1273 LOperand* external_pointer() { return inputs_[0]; }
1274 LOperand* key() { return inputs_[1]; } 1274 LOperand* key() { return inputs_[1]; }
1275 ElementsKind elements_kind() const { 1275 ElementsKind elements_kind() const {
1276 return hydrogen()->elements_kind(); 1276 return hydrogen()->elements_kind();
1277 } 1277 }
1278 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1278 }; 1279 };
1279 1280
1280 1281
1281 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> { 1282 class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> {
1282 public: 1283 public:
1283 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { 1284 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) {
1284 inputs_[0] = context; 1285 inputs_[0] = context;
1285 inputs_[1] = obj; 1286 inputs_[1] = obj;
1286 inputs_[2] = key; 1287 inputs_[2] = key;
1287 } 1288 }
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 1769
1769 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, 1770 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1770 "store-keyed-fast-element") 1771 "store-keyed-fast-element")
1771 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) 1772 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1772 1773
1773 virtual void PrintDataTo(StringStream* stream); 1774 virtual void PrintDataTo(StringStream* stream);
1774 1775
1775 LOperand* object() { return inputs_[0]; } 1776 LOperand* object() { return inputs_[0]; }
1776 LOperand* key() { return inputs_[1]; } 1777 LOperand* key() { return inputs_[1]; }
1777 LOperand* value() { return inputs_[2]; } 1778 LOperand* value() { return inputs_[2]; }
1779 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1778 }; 1780 };
1779 1781
1780 1782
1781 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> { 1783 class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
1782 public: 1784 public:
1783 LStoreKeyedFastDoubleElement(LOperand* elements, 1785 LStoreKeyedFastDoubleElement(LOperand* elements,
1784 LOperand* key, 1786 LOperand* key,
1785 LOperand* val) { 1787 LOperand* val) {
1786 inputs_[0] = elements; 1788 inputs_[0] = elements;
1787 inputs_[1] = key; 1789 inputs_[1] = key;
1788 inputs_[2] = val; 1790 inputs_[2] = val;
1789 } 1791 }
1790 1792
1791 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement, 1793 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement,
1792 "store-keyed-fast-double-element") 1794 "store-keyed-fast-double-element")
1793 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement) 1795 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastDoubleElement)
1794 1796
1795 virtual void PrintDataTo(StringStream* stream); 1797 virtual void PrintDataTo(StringStream* stream);
1796 1798
1797 LOperand* elements() { return inputs_[0]; } 1799 LOperand* elements() { return inputs_[0]; }
1798 LOperand* key() { return inputs_[1]; } 1800 LOperand* key() { return inputs_[1]; }
1799 LOperand* value() { return inputs_[2]; } 1801 LOperand* value() { return inputs_[2]; }
1802 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1800 1803
1801 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 1804 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
1802 }; 1805 };
1803 1806
1804 1807
1805 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> { 1808 class LStoreKeyedSpecializedArrayElement: public LTemplateInstruction<0, 3, 0> {
1806 public: 1809 public:
1807 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer, 1810 LStoreKeyedSpecializedArrayElement(LOperand* external_pointer,
1808 LOperand* key, 1811 LOperand* key,
1809 LOperand* val) { 1812 LOperand* val) {
1810 inputs_[0] = external_pointer; 1813 inputs_[0] = external_pointer;
1811 inputs_[1] = key; 1814 inputs_[1] = key;
1812 inputs_[2] = val; 1815 inputs_[2] = val;
1813 } 1816 }
1814 1817
1815 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement, 1818 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement,
1816 "store-keyed-specialized-array-element") 1819 "store-keyed-specialized-array-element")
1817 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement) 1820 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedSpecializedArrayElement)
1818 1821
1819 LOperand* external_pointer() { return inputs_[0]; } 1822 LOperand* external_pointer() { return inputs_[0]; }
1820 LOperand* key() { return inputs_[1]; } 1823 LOperand* key() { return inputs_[1]; }
1821 LOperand* value() { return inputs_[2]; } 1824 LOperand* value() { return inputs_[2]; }
1822 ElementsKind elements_kind() const { 1825 ElementsKind elements_kind() const {
1823 return hydrogen()->elements_kind(); 1826 return hydrogen()->elements_kind();
1824 } 1827 }
1828 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1825 }; 1829 };
1826 1830
1827 1831
1828 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { 1832 class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> {
1829 public: 1833 public:
1830 LStoreKeyedGeneric(LOperand* context, 1834 LStoreKeyedGeneric(LOperand* context,
1831 LOperand* object, 1835 LOperand* object,
1832 LOperand* key, 1836 LOperand* key,
1833 LOperand* value) { 1837 LOperand* value) {
1834 inputs_[0] = context; 1838 inputs_[0] = context;
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 2516
2513 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2517 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2514 }; 2518 };
2515 2519
2516 #undef DECLARE_HYDROGEN_ACCESSOR 2520 #undef DECLARE_HYDROGEN_ACCESSOR
2517 #undef DECLARE_CONCRETE_INSTRUCTION 2521 #undef DECLARE_CONCRETE_INSTRUCTION
2518 2522
2519 } } // namespace v8::internal 2523 } } // namespace v8::internal
2520 2524
2521 #endif // V8_IA32_LITHIUM_IA32_H_ 2525 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698