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

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

Issue 6656001: Support external arrays in Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version 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
« no previous file with comments | « src/arm/lithium-arm.h ('k') | 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 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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 HLoadKeyedFastElement* instr) { 1815 HLoadKeyedFastElement* instr) {
1816 ASSERT(instr->representation().IsTagged()); 1816 ASSERT(instr->representation().IsTagged());
1817 ASSERT(instr->key()->representation().IsInteger32()); 1817 ASSERT(instr->key()->representation().IsInteger32());
1818 LOperand* obj = UseRegisterAtStart(instr->object()); 1818 LOperand* obj = UseRegisterAtStart(instr->object());
1819 LOperand* key = UseRegisterAtStart(instr->key()); 1819 LOperand* key = UseRegisterAtStart(instr->key());
1820 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1820 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1821 return AssignEnvironment(DefineSameAsFirst(result)); 1821 return AssignEnvironment(DefineSameAsFirst(result));
1822 } 1822 }
1823 1823
1824 1824
1825 LInstruction* LChunkBuilder::DoLoadPixelArrayElement( 1825 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1826 HLoadPixelArrayElement* instr) { 1826 HLoadKeyedSpecializedArrayElement* instr) {
1827 // TODO(danno): Add support for other external array types.
1828 if (instr->array_type() != kExternalPixelArray) {
1829 Abort("unsupported load for external array type.");
1830 }
1831
1827 ASSERT(instr->representation().IsInteger32()); 1832 ASSERT(instr->representation().IsInteger32());
1828 ASSERT(instr->key()->representation().IsInteger32()); 1833 ASSERT(instr->key()->representation().IsInteger32());
1829 LOperand* external_pointer = 1834 LOperand* external_pointer =
1830 UseRegisterAtStart(instr->external_pointer()); 1835 UseRegisterAtStart(instr->external_pointer());
1831 LOperand* key = UseRegisterAtStart(instr->key()); 1836 LOperand* key = UseRegisterAtStart(instr->key());
1832 LLoadPixelArrayElement* result = 1837 LLoadKeyedSpecializedArrayElement* result =
1833 new LLoadPixelArrayElement(external_pointer, key); 1838 new LLoadKeyedSpecializedArrayElement(external_pointer,
1839 key);
1834 return DefineAsRegister(result); 1840 return DefineAsRegister(result);
1835 } 1841 }
1836 1842
1837 1843
1838 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1844 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1839 LOperand* object = UseFixed(instr->object(), r1); 1845 LOperand* object = UseFixed(instr->object(), r1);
1840 LOperand* key = UseFixed(instr->key(), r0); 1846 LOperand* key = UseFixed(instr->key(), r0);
1841 1847
1842 LInstruction* result = 1848 LInstruction* result =
1843 DefineFixed(new LLoadKeyedGeneric(object, key), r0); 1849 DefineFixed(new LLoadKeyedGeneric(object, key), r0);
(...skipping 13 matching lines...) Expand all
1857 ? UseTempRegister(instr->value()) 1863 ? UseTempRegister(instr->value())
1858 : UseRegisterAtStart(instr->value()); 1864 : UseRegisterAtStart(instr->value());
1859 LOperand* key = needs_write_barrier 1865 LOperand* key = needs_write_barrier
1860 ? UseTempRegister(instr->key()) 1866 ? UseTempRegister(instr->key())
1861 : UseRegisterOrConstantAtStart(instr->key()); 1867 : UseRegisterOrConstantAtStart(instr->key());
1862 1868
1863 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1869 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1864 } 1870 }
1865 1871
1866 1872
1867 LInstruction* LChunkBuilder::DoStorePixelArrayElement( 1873 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1868 HStorePixelArrayElement* instr) { 1874 HStoreKeyedSpecializedArrayElement* instr) {
1875 // TODO(danno): Add support for other external array types.
1876 if (instr->array_type() != kExternalPixelArray) {
1877 Abort("unsupported store for external array type.");
1878 }
1879
1869 ASSERT(instr->value()->representation().IsInteger32()); 1880 ASSERT(instr->value()->representation().IsInteger32());
1870 ASSERT(instr->external_pointer()->representation().IsExternal()); 1881 ASSERT(instr->external_pointer()->representation().IsExternal());
1871 ASSERT(instr->key()->representation().IsInteger32()); 1882 ASSERT(instr->key()->representation().IsInteger32());
1872 1883
1873 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1884 LOperand* external_pointer = UseRegister(instr->external_pointer());
1874 LOperand* value = UseTempRegister(instr->value()); // changed by clamp. 1885 LOperand* value = UseTempRegister(instr->value()); // changed by clamp.
1875 LOperand* key = UseRegister(instr->key()); 1886 LOperand* key = UseRegister(instr->key());
1876 1887
1877 return new LStorePixelArrayElement(external_pointer, key, value); 1888 return new LStoreKeyedSpecializedArrayElement(external_pointer,
1889 key,
1890 value);
1878 } 1891 }
1879 1892
1880 1893
1881 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 1894 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1882 LOperand* obj = UseFixed(instr->object(), r2); 1895 LOperand* obj = UseFixed(instr->object(), r2);
1883 LOperand* key = UseFixed(instr->key(), r1); 1896 LOperand* key = UseFixed(instr->key(), r1);
1884 LOperand* val = UseFixed(instr->value(), r0); 1897 LOperand* val = UseFixed(instr->value(), r0);
1885 1898
1886 ASSERT(instr->object()->representation().IsTagged()); 1899 ASSERT(instr->object()->representation().IsTagged());
1887 ASSERT(instr->key()->representation().IsTagged()); 1900 ASSERT(instr->key()->representation().IsTagged());
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 2095
2083 2096
2084 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2097 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2085 HEnvironment* outer = current_block_->last_environment()->outer(); 2098 HEnvironment* outer = current_block_->last_environment()->outer();
2086 current_block_->UpdateEnvironment(outer); 2099 current_block_->UpdateEnvironment(outer);
2087 return NULL; 2100 return NULL;
2088 } 2101 }
2089 2102
2090 2103
2091 } } // namespace v8::internal 2104 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698