| OLD | NEW |
| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 365 |
| 366 void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) { | 366 void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) { |
| 367 object()->PrintTo(stream); | 367 object()->PrintTo(stream); |
| 368 stream->Add("["); | 368 stream->Add("["); |
| 369 key()->PrintTo(stream); | 369 key()->PrintTo(stream); |
| 370 stream->Add("] <- "); | 370 stream->Add("] <- "); |
| 371 value()->PrintTo(stream); | 371 value()->PrintTo(stream); |
| 372 } | 372 } |
| 373 | 373 |
| 374 | 374 |
| 375 void LStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) { |
| 376 elements()->PrintTo(stream); |
| 377 stream->Add("["); |
| 378 key()->PrintTo(stream); |
| 379 stream->Add("] <- "); |
| 380 value()->PrintTo(stream); |
| 381 } |
| 382 |
| 383 |
| 375 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | 384 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
| 376 object()->PrintTo(stream); | 385 object()->PrintTo(stream); |
| 377 stream->Add("["); | 386 stream->Add("["); |
| 378 key()->PrintTo(stream); | 387 key()->PrintTo(stream); |
| 379 stream->Add("] <- "); | 388 stream->Add("] <- "); |
| 380 value()->PrintTo(stream); | 389 value()->PrintTo(stream); |
| 381 } | 390 } |
| 382 | 391 |
| 383 | 392 |
| 384 LChunk::LChunk(CompilationInfo* info, HGraph* graph) | 393 LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
| (...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 HLoadKeyedFastElement* instr) { | 1846 HLoadKeyedFastElement* instr) { |
| 1838 ASSERT(instr->representation().IsTagged()); | 1847 ASSERT(instr->representation().IsTagged()); |
| 1839 ASSERT(instr->key()->representation().IsInteger32()); | 1848 ASSERT(instr->key()->representation().IsInteger32()); |
| 1840 LOperand* obj = UseRegisterAtStart(instr->object()); | 1849 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1841 LOperand* key = UseRegisterAtStart(instr->key()); | 1850 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1842 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1851 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| 1843 return AssignEnvironment(DefineAsRegister(result)); | 1852 return AssignEnvironment(DefineAsRegister(result)); |
| 1844 } | 1853 } |
| 1845 | 1854 |
| 1846 | 1855 |
| 1856 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( |
| 1857 HLoadKeyedFastDoubleElement* instr) { |
| 1858 ASSERT(instr->representation().IsDouble()); |
| 1859 ASSERT(instr->key()->representation().IsInteger32()); |
| 1860 LOperand* elements = UseTempRegister(instr->elements()); |
| 1861 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1862 LLoadKeyedFastDoubleElement* result = |
| 1863 new LLoadKeyedFastDoubleElement(elements, key); |
| 1864 return AssignEnvironment(DefineAsRegister(result)); |
| 1865 } |
| 1866 |
| 1867 |
| 1847 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( | 1868 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( |
| 1848 HLoadKeyedSpecializedArrayElement* instr) { | 1869 HLoadKeyedSpecializedArrayElement* instr) { |
| 1849 JSObject::ElementsKind elements_kind = instr->elements_kind(); | 1870 JSObject::ElementsKind elements_kind = instr->elements_kind(); |
| 1850 Representation representation(instr->representation()); | 1871 Representation representation(instr->representation()); |
| 1851 ASSERT( | 1872 ASSERT( |
| 1852 (representation.IsInteger32() && | 1873 (representation.IsInteger32() && |
| 1853 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && | 1874 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && |
| 1854 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || | 1875 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || |
| 1855 (representation.IsDouble() && | 1876 (representation.IsDouble() && |
| 1856 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || | 1877 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1890 ? UseTempRegister(instr->value()) | 1911 ? UseTempRegister(instr->value()) |
| 1891 : UseRegisterAtStart(instr->value()); | 1912 : UseRegisterAtStart(instr->value()); |
| 1892 LOperand* key = needs_write_barrier | 1913 LOperand* key = needs_write_barrier |
| 1893 ? UseTempRegister(instr->key()) | 1914 ? UseTempRegister(instr->key()) |
| 1894 : UseRegisterOrConstantAtStart(instr->key()); | 1915 : UseRegisterOrConstantAtStart(instr->key()); |
| 1895 | 1916 |
| 1896 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); | 1917 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); |
| 1897 } | 1918 } |
| 1898 | 1919 |
| 1899 | 1920 |
| 1921 LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement( |
| 1922 HStoreKeyedFastDoubleElement* instr) { |
| 1923 ASSERT(instr->value()->representation().IsDouble()); |
| 1924 ASSERT(instr->elements()->representation().IsTagged()); |
| 1925 ASSERT(instr->key()->representation().IsInteger32()); |
| 1926 |
| 1927 LOperand* elements = UseRegisterAtStart(instr->elements()); |
| 1928 LOperand* val = UseTempRegister(instr->value()); |
| 1929 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1930 |
| 1931 return new LStoreKeyedFastDoubleElement(elements, key, val); |
| 1932 } |
| 1933 |
| 1934 |
| 1900 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( | 1935 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
| 1901 HStoreKeyedSpecializedArrayElement* instr) { | 1936 HStoreKeyedSpecializedArrayElement* instr) { |
| 1902 Representation representation(instr->value()->representation()); | 1937 Representation representation(instr->value()->representation()); |
| 1903 JSObject::ElementsKind elements_kind = instr->elements_kind(); | 1938 JSObject::ElementsKind elements_kind = instr->elements_kind(); |
| 1904 ASSERT( | 1939 ASSERT( |
| 1905 (representation.IsInteger32() && | 1940 (representation.IsInteger32() && |
| 1906 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && | 1941 (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && |
| 1907 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || | 1942 (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || |
| 1908 (representation.IsDouble() && | 1943 (representation.IsDouble() && |
| 1909 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || | 1944 ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 | 2188 |
| 2154 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2189 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2155 LOperand* key = UseRegisterAtStart(instr->key()); | 2190 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2156 LOperand* object = UseRegisterAtStart(instr->object()); | 2191 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2157 LIn* result = new LIn(key, object); | 2192 LIn* result = new LIn(key, object); |
| 2158 return MarkAsCall(DefineFixed(result, r0), instr); | 2193 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2159 } | 2194 } |
| 2160 | 2195 |
| 2161 | 2196 |
| 2162 } } // namespace v8::internal | 2197 } } // namespace v8::internal |
| OLD | NEW |