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

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

Issue 7350021: Crankshaft support for FixedDoubleArrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 5 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/x64/lithium-x64.h ('k') | test/mjsunit/unbox-double-arrays.js » ('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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) { 422 void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
423 object()->PrintTo(stream); 423 object()->PrintTo(stream);
424 stream->Add("["); 424 stream->Add("[");
425 key()->PrintTo(stream); 425 key()->PrintTo(stream);
426 stream->Add("] <- "); 426 stream->Add("] <- ");
427 value()->PrintTo(stream); 427 value()->PrintTo(stream);
428 } 428 }
429 429
430 430
431 void LStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
432 elements()->PrintTo(stream);
433 stream->Add("[");
434 key()->PrintTo(stream);
435 stream->Add("] <- ");
436 value()->PrintTo(stream);
437 }
438
439
431 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { 440 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
432 object()->PrintTo(stream); 441 object()->PrintTo(stream);
433 stream->Add("["); 442 stream->Add("[");
434 key()->PrintTo(stream); 443 key()->PrintTo(stream);
435 stream->Add("] <- "); 444 stream->Add("] <- ");
436 value()->PrintTo(stream); 445 value()->PrintTo(stream);
437 } 446 }
438 447
439 448
440 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) { 449 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 HLoadKeyedFastElement* instr) { 1824 HLoadKeyedFastElement* instr) {
1816 ASSERT(instr->representation().IsTagged()); 1825 ASSERT(instr->representation().IsTagged());
1817 ASSERT(instr->key()->representation().IsInteger32()); 1826 ASSERT(instr->key()->representation().IsInteger32());
1818 LOperand* obj = UseRegisterAtStart(instr->object()); 1827 LOperand* obj = UseRegisterAtStart(instr->object());
1819 LOperand* key = UseRegisterAtStart(instr->key()); 1828 LOperand* key = UseRegisterAtStart(instr->key());
1820 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1829 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1821 return AssignEnvironment(DefineSameAsFirst(result)); 1830 return AssignEnvironment(DefineSameAsFirst(result));
1822 } 1831 }
1823 1832
1824 1833
1834 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
1835 HLoadKeyedFastDoubleElement* instr) {
1836 ASSERT(instr->representation().IsDouble());
1837 ASSERT(instr->key()->representation().IsInteger32());
1838 LOperand* elements = UseRegisterAtStart(instr->elements());
1839 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
1840 LLoadKeyedFastDoubleElement* result =
1841 new LLoadKeyedFastDoubleElement(elements, key);
1842 return AssignEnvironment(DefineAsRegister(result));
1843 }
1844
1845
1825 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1846 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1826 HLoadKeyedSpecializedArrayElement* instr) { 1847 HLoadKeyedSpecializedArrayElement* instr) {
1827 JSObject::ElementsKind elements_kind = instr->elements_kind(); 1848 JSObject::ElementsKind elements_kind = instr->elements_kind();
1828 Representation representation(instr->representation()); 1849 Representation representation(instr->representation());
1829 ASSERT( 1850 ASSERT(
1830 (representation.IsInteger32() && 1851 (representation.IsInteger32() &&
1831 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && 1852 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
1832 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || 1853 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
1833 (representation.IsDouble() && 1854 (representation.IsDouble() &&
1834 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || 1855 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 ? UseTempRegister(instr->value()) 1888 ? UseTempRegister(instr->value())
1868 : UseRegisterAtStart(instr->value()); 1889 : UseRegisterAtStart(instr->value());
1869 LOperand* key = needs_write_barrier 1890 LOperand* key = needs_write_barrier
1870 ? UseTempRegister(instr->key()) 1891 ? UseTempRegister(instr->key())
1871 : UseRegisterOrConstantAtStart(instr->key()); 1892 : UseRegisterOrConstantAtStart(instr->key());
1872 1893
1873 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1894 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1874 } 1895 }
1875 1896
1876 1897
1898 LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement(
1899 HStoreKeyedFastDoubleElement* instr) {
1900 ASSERT(instr->value()->representation().IsDouble());
1901 ASSERT(instr->elements()->representation().IsTagged());
1902 ASSERT(instr->key()->representation().IsInteger32());
1903
1904 LOperand* elements = UseRegisterAtStart(instr->elements());
1905 LOperand* val = UseTempRegister(instr->value());
1906 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
1907
1908 return new LStoreKeyedFastDoubleElement(elements, key, val);
1909 }
1910
1911
1877 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1912 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1878 HStoreKeyedSpecializedArrayElement* instr) { 1913 HStoreKeyedSpecializedArrayElement* instr) {
1879 Representation representation(instr->value()->representation()); 1914 Representation representation(instr->value()->representation());
1880 JSObject::ElementsKind elements_kind = instr->elements_kind(); 1915 JSObject::ElementsKind elements_kind = instr->elements_kind();
1881 ASSERT( 1916 ASSERT(
1882 (representation.IsInteger32() && 1917 (representation.IsInteger32() &&
1883 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && 1918 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) &&
1884 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || 1919 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) ||
1885 (representation.IsDouble() && 1920 (representation.IsDouble() &&
1886 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || 1921 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) ||
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 LOperand* key = UseOrConstantAtStart(instr->key()); 2173 LOperand* key = UseOrConstantAtStart(instr->key());
2139 LOperand* object = UseOrConstantAtStart(instr->object()); 2174 LOperand* object = UseOrConstantAtStart(instr->object());
2140 LIn* result = new LIn(key, object); 2175 LIn* result = new LIn(key, object);
2141 return MarkAsCall(DefineFixed(result, rax), instr); 2176 return MarkAsCall(DefineFixed(result, rax), instr);
2142 } 2177 }
2143 2178
2144 2179
2145 } } // namespace v8::internal 2180 } } // namespace v8::internal
2146 2181
2147 #endif // V8_TARGET_ARCH_X64 2182 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/mjsunit/unbox-double-arrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698