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

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

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: feedback, propagate external array type Created 9 years, 9 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 return DefineSameAsFirst(new LClassOfTest(value)); 1541 return DefineSameAsFirst(new LClassOfTest(value));
1542 } 1542 }
1543 1543
1544 1544
1545 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { 1545 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1546 LOperand* array = UseRegisterAtStart(instr->value()); 1546 LOperand* array = UseRegisterAtStart(instr->value());
1547 return DefineAsRegister(new LJSArrayLength(array)); 1547 return DefineAsRegister(new LJSArrayLength(array));
1548 } 1548 }
1549 1549
1550 1550
1551 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) { 1551 LInstruction* LChunkBuilder::DoExternalArrayLength(
1552 HExternalArrayLength* instr) {
1552 LOperand* array = UseRegisterAtStart(instr->value()); 1553 LOperand* array = UseRegisterAtStart(instr->value());
1553 return DefineAsRegister(new LPixelArrayLength(array)); 1554 return DefineAsRegister(new LExternalArrayLength(array));
1554 } 1555 }
1555 1556
1556 1557
1557 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1558 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1558 LOperand* array = UseRegisterAtStart(instr->value()); 1559 LOperand* array = UseRegisterAtStart(instr->value());
1559 return DefineAsRegister(new LFixedArrayLength(array)); 1560 return DefineAsRegister(new LFixedArrayLength(array));
1560 } 1561 }
1561 1562
1562 1563
1563 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1564 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 new LLoadFunctionPrototype(UseRegister(instr->function())))); 1768 new LLoadFunctionPrototype(UseRegister(instr->function()))));
1768 } 1769 }
1769 1770
1770 1771
1771 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { 1772 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
1772 LOperand* input = UseRegisterAtStart(instr->value()); 1773 LOperand* input = UseRegisterAtStart(instr->value());
1773 return DefineAsRegister(new LLoadElements(input)); 1774 return DefineAsRegister(new LLoadElements(input));
1774 } 1775 }
1775 1776
1776 1777
1777 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer( 1778 LInstruction* LChunkBuilder::DoLoadExternalArrayPointer(
1778 HLoadPixelArrayExternalPointer* instr) { 1779 HLoadExternalArrayPointer* instr) {
1779 LOperand* input = UseRegisterAtStart(instr->value()); 1780 LOperand* input = UseRegisterAtStart(instr->value());
1780 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input)); 1781 return DefineAsRegister(new LLoadExternalArrayPointer(input));
1781 } 1782 }
1782 1783
1783 1784
1784 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( 1785 LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1785 HLoadKeyedFastElement* instr) { 1786 HLoadKeyedFastElement* instr) {
1786 ASSERT(instr->representation().IsTagged()); 1787 ASSERT(instr->representation().IsTagged());
1787 ASSERT(instr->key()->representation().IsInteger32()); 1788 ASSERT(instr->key()->representation().IsInteger32());
1788 LOperand* obj = UseRegisterAtStart(instr->object()); 1789 LOperand* obj = UseRegisterAtStart(instr->object());
1789 LOperand* key = UseRegisterAtStart(instr->key()); 1790 LOperand* key = UseRegisterAtStart(instr->key());
1790 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1791 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 LOperand* key = needs_write_barrier 1830 LOperand* key = needs_write_barrier
1830 ? UseTempRegister(instr->key()) 1831 ? UseTempRegister(instr->key())
1831 : UseRegisterOrConstantAtStart(instr->key()); 1832 : UseRegisterOrConstantAtStart(instr->key());
1832 1833
1833 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1834 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1834 } 1835 }
1835 1836
1836 1837
1837 LInstruction* LChunkBuilder::DoStorePixelArrayElement( 1838 LInstruction* LChunkBuilder::DoStorePixelArrayElement(
1838 HStorePixelArrayElement* instr) { 1839 HStorePixelArrayElement* instr) {
1839 Abort("DoStorePixelArrayElement not implemented"); 1840 ASSERT(instr->value()->representation().IsInteger32());
1840 return NULL; 1841 ASSERT(instr->external_pointer()->representation().IsExternal());
1842 ASSERT(instr->key()->representation().IsInteger32());
1843
1844 LOperand* external_pointer = UseRegister(instr->external_pointer());
1845 LOperand* value = UseTempRegister(instr->value()); // changed by clamp.
1846 LOperand* key = UseRegister(instr->key());
1847
1848 return new LStorePixelArrayElement(external_pointer, key, value);
1841 } 1849 }
1842 1850
1843 1851
1844 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 1852 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1845 LOperand* obj = UseFixed(instr->object(), r2); 1853 LOperand* obj = UseFixed(instr->object(), r2);
1846 LOperand* key = UseFixed(instr->key(), r1); 1854 LOperand* key = UseFixed(instr->key(), r1);
1847 LOperand* val = UseFixed(instr->value(), r0); 1855 LOperand* val = UseFixed(instr->value(), r0);
1848 1856
1849 ASSERT(instr->object()->representation().IsTagged()); 1857 ASSERT(instr->object()->representation().IsTagged());
1850 ASSERT(instr->key()->representation().IsTagged()); 1858 ASSERT(instr->key()->representation().IsTagged());
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 2039
2032 2040
2033 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2041 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2034 HEnvironment* outer = current_block_->last_environment()->outer(); 2042 HEnvironment* outer = current_block_->last_environment()->outer();
2035 current_block_->UpdateEnvironment(outer); 2043 current_block_->UpdateEnvironment(outer);
2036 return NULL; 2044 return NULL;
2037 } 2045 }
2038 2046
2039 2047
2040 } } // namespace v8::internal 2048 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698