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