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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 LOperand* external_pointer = | 1689 LOperand* external_pointer = |
1690 UseRegisterAtStart(instr->external_pointer()); | 1690 UseRegisterAtStart(instr->external_pointer()); |
1691 LOperand* key = UseRegisterAtStart(instr->key()); | 1691 LOperand* key = UseRegisterAtStart(instr->key()); |
1692 LLoadPixelArrayElement* result = | 1692 LLoadPixelArrayElement* result = |
1693 new LLoadPixelArrayElement(external_pointer, key); | 1693 new LLoadPixelArrayElement(external_pointer, key); |
1694 return DefineSameAsFirst(result); | 1694 return DefineSameAsFirst(result); |
1695 } | 1695 } |
1696 | 1696 |
1697 | 1697 |
1698 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1698 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
1699 Abort("Unimplemented: %s", "DoLoadKeyedGeneric"); | 1699 LOperand* object = UseFixed(instr->object(), rdx); |
1700 return NULL; | 1700 LOperand* key = UseFixed(instr->key(), rax); |
| 1701 |
| 1702 LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key); |
| 1703 return MarkAsCall(DefineFixed(result, rax), instr); |
1701 } | 1704 } |
1702 | 1705 |
1703 | 1706 |
1704 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( | 1707 LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
1705 HStoreKeyedFastElement* instr) { | 1708 HStoreKeyedFastElement* instr) { |
1706 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 1709 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
1707 ASSERT(instr->value()->representation().IsTagged()); | 1710 ASSERT(instr->value()->representation().IsTagged()); |
1708 ASSERT(instr->object()->representation().IsTagged()); | 1711 ASSERT(instr->object()->representation().IsTagged()); |
1709 ASSERT(instr->key()->representation().IsInteger32()); | 1712 ASSERT(instr->key()->representation().IsInteger32()); |
1710 | 1713 |
(...skipping 17 matching lines...) Expand all Loading... |
1728 | 1731 |
1729 LOperand* external_pointer = UseRegister(instr->external_pointer()); | 1732 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
1730 LOperand* val = UseTempRegister(instr->value()); | 1733 LOperand* val = UseTempRegister(instr->value()); |
1731 LOperand* key = UseRegister(instr->key()); | 1734 LOperand* key = UseRegister(instr->key()); |
1732 | 1735 |
1733 return new LStorePixelArrayElement(external_pointer, key, val); | 1736 return new LStorePixelArrayElement(external_pointer, key, val); |
1734 } | 1737 } |
1735 | 1738 |
1736 | 1739 |
1737 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 1740 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
1738 Abort("Unimplemented: %s", "DoStoreKeyedGeneric"); | 1741 LOperand* object = UseFixed(instr->object(), rdx); |
1739 return NULL; | 1742 LOperand* key = UseFixed(instr->key(), rcx); |
| 1743 LOperand* value = UseFixed(instr->value(), rax); |
| 1744 |
| 1745 ASSERT(instr->object()->representation().IsTagged()); |
| 1746 ASSERT(instr->key()->representation().IsTagged()); |
| 1747 ASSERT(instr->value()->representation().IsTagged()); |
| 1748 |
| 1749 LStoreKeyedGeneric* result = new LStoreKeyedGeneric(object, key, value); |
| 1750 return MarkAsCall(result, instr); |
1740 } | 1751 } |
1741 | 1752 |
1742 | 1753 |
1743 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 1754 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
1744 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 1755 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
1745 | 1756 |
1746 LOperand* obj = needs_write_barrier | 1757 LOperand* obj = needs_write_barrier |
1747 ? UseTempRegister(instr->object()) | 1758 ? UseTempRegister(instr->object()) |
1748 : UseRegisterAtStart(instr->object()); | 1759 : UseRegisterAtStart(instr->object()); |
1749 | 1760 |
1750 LOperand* val = needs_write_barrier | 1761 LOperand* val = needs_write_barrier |
1751 ? UseTempRegister(instr->value()) | 1762 ? UseTempRegister(instr->value()) |
1752 : UseRegister(instr->value()); | 1763 : UseRegister(instr->value()); |
1753 | 1764 |
1754 // We only need a scratch register if we have a write barrier or we | 1765 // We only need a scratch register if we have a write barrier or we |
1755 // have a store into the properties array (not in-object-property). | 1766 // have a store into the properties array (not in-object-property). |
1756 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) | 1767 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) |
1757 ? TempRegister() : NULL; | 1768 ? TempRegister() : NULL; |
1758 | 1769 |
1759 return new LStoreNamedField(obj, val, temp); | 1770 return new LStoreNamedField(obj, val, temp); |
1760 } | 1771 } |
1761 | 1772 |
1762 | 1773 |
1763 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 1774 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
1764 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); | 1775 LOperand* object = UseFixed(instr->object(), rdx); |
1765 return NULL; | 1776 LOperand* value = UseFixed(instr->value(), rax); |
| 1777 |
| 1778 LStoreNamedGeneric* result = new LStoreNamedGeneric(object, value); |
| 1779 return MarkAsCall(result, instr); |
1766 } | 1780 } |
1767 | 1781 |
1768 | 1782 |
1769 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { | 1783 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { |
1770 Abort("Unimplemented: %s", "DoStringCharCodeAt"); | 1784 Abort("Unimplemented: %s", "DoStringCharCodeAt"); |
1771 return NULL; | 1785 return NULL; |
1772 } | 1786 } |
1773 | 1787 |
1774 | 1788 |
1775 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 1789 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 | 1927 |
1914 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1928 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1915 HEnvironment* outer = current_block_->last_environment()->outer(); | 1929 HEnvironment* outer = current_block_->last_environment()->outer(); |
1916 current_block_->UpdateEnvironment(outer); | 1930 current_block_->UpdateEnvironment(outer); |
1917 return NULL; | 1931 return NULL; |
1918 } | 1932 } |
1919 | 1933 |
1920 } } // namespace v8::internal | 1934 } } // namespace v8::internal |
1921 | 1935 |
1922 #endif // V8_TARGET_ARCH_X64 | 1936 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |