| 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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 return DefineSameAsFirst(new LClassOfTest(value)); | 1515 return DefineSameAsFirst(new LClassOfTest(value)); |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 | 1518 |
| 1519 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { | 1519 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { |
| 1520 LOperand* array = UseRegisterAtStart(instr->value()); | 1520 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1521 return DefineAsRegister(new LJSArrayLength(array)); | 1521 return DefineAsRegister(new LJSArrayLength(array)); |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 | 1524 |
| 1525 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) { | 1525 LInstruction* LChunkBuilder::DoExternalArrayLength( |
| 1526 HExternalArrayLength* instr) { |
| 1526 LOperand* array = UseRegisterAtStart(instr->value()); | 1527 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1527 return DefineAsRegister(new LPixelArrayLength(array)); | 1528 return DefineAsRegister(new LExternalArrayLength(array)); |
| 1528 } | 1529 } |
| 1529 | 1530 |
| 1530 | 1531 |
| 1531 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { | 1532 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { |
| 1532 LOperand* array = UseRegisterAtStart(instr->value()); | 1533 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1533 return DefineAsRegister(new LFixedArrayLength(array)); | 1534 return DefineAsRegister(new LFixedArrayLength(array)); |
| 1534 } | 1535 } |
| 1535 | 1536 |
| 1536 | 1537 |
| 1537 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1538 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 new LLoadFunctionPrototype(UseRegister(instr->function())))); | 1740 new LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 1740 } | 1741 } |
| 1741 | 1742 |
| 1742 | 1743 |
| 1743 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { | 1744 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { |
| 1744 LOperand* input = UseRegisterAtStart(instr->value()); | 1745 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1745 return DefineAsRegister(new LLoadElements(input)); | 1746 return DefineAsRegister(new LLoadElements(input)); |
| 1746 } | 1747 } |
| 1747 | 1748 |
| 1748 | 1749 |
| 1749 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer( | 1750 LInstruction* LChunkBuilder::DoLoadExternalArrayPointer( |
| 1750 HLoadPixelArrayExternalPointer* instr) { | 1751 HLoadExternalArrayPointer* instr) { |
| 1751 LOperand* input = UseRegisterAtStart(instr->value()); | 1752 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1752 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input)); | 1753 return DefineAsRegister(new LLoadExternalArrayPointer(input)); |
| 1753 } | 1754 } |
| 1754 | 1755 |
| 1755 | 1756 |
| 1756 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1757 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| 1757 HLoadKeyedFastElement* instr) { | 1758 HLoadKeyedFastElement* instr) { |
| 1758 ASSERT(instr->representation().IsTagged()); | 1759 ASSERT(instr->representation().IsTagged()); |
| 1759 ASSERT(instr->key()->representation().IsInteger32()); | 1760 ASSERT(instr->key()->representation().IsInteger32()); |
| 1760 LOperand* obj = UseRegisterAtStart(instr->object()); | 1761 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1761 LOperand* key = UseRegisterAtStart(instr->key()); | 1762 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1762 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1763 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 LOperand* key = needs_write_barrier | 1802 LOperand* key = needs_write_barrier |
| 1802 ? UseTempRegister(instr->key()) | 1803 ? UseTempRegister(instr->key()) |
| 1803 : UseRegisterOrConstantAtStart(instr->key()); | 1804 : UseRegisterOrConstantAtStart(instr->key()); |
| 1804 | 1805 |
| 1805 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); | 1806 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); |
| 1806 } | 1807 } |
| 1807 | 1808 |
| 1808 | 1809 |
| 1809 LInstruction* LChunkBuilder::DoStorePixelArrayElement( | 1810 LInstruction* LChunkBuilder::DoStorePixelArrayElement( |
| 1810 HStorePixelArrayElement* instr) { | 1811 HStorePixelArrayElement* instr) { |
| 1811 Abort("DoStorePixelArrayElement not implemented"); | 1812 ASSERT(instr->value()->representation().IsInteger32()); |
| 1812 return NULL; | 1813 ASSERT(instr->external_pointer()->representation().IsExternal()); |
| 1814 ASSERT(instr->key()->representation().IsInteger32()); |
| 1815 |
| 1816 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
| 1817 LOperand* value = UseTempRegister(instr->value()); // changed by clamp. |
| 1818 LOperand* key = UseRegister(instr->key()); |
| 1819 |
| 1820 return new LStorePixelArrayElement(external_pointer, key, value); |
| 1813 } | 1821 } |
| 1814 | 1822 |
| 1815 | 1823 |
| 1816 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 1824 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 1817 LOperand* obj = UseFixed(instr->object(), r2); | 1825 LOperand* obj = UseFixed(instr->object(), r2); |
| 1818 LOperand* key = UseFixed(instr->key(), r1); | 1826 LOperand* key = UseFixed(instr->key(), r1); |
| 1819 LOperand* val = UseFixed(instr->value(), r0); | 1827 LOperand* val = UseFixed(instr->value(), r0); |
| 1820 | 1828 |
| 1821 ASSERT(instr->object()->representation().IsTagged()); | 1829 ASSERT(instr->object()->representation().IsTagged()); |
| 1822 ASSERT(instr->key()->representation().IsTagged()); | 1830 ASSERT(instr->key()->representation().IsTagged()); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 | 2009 |
| 2002 | 2010 |
| 2003 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2011 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2004 HEnvironment* outer = current_block_->last_environment()->outer(); | 2012 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2005 current_block_->UpdateEnvironment(outer); | 2013 current_block_->UpdateEnvironment(outer); |
| 2006 return NULL; | 2014 return NULL; |
| 2007 } | 2015 } |
| 2008 | 2016 |
| 2009 | 2017 |
| 2010 } } // namespace v8::internal | 2018 } } // namespace v8::internal |
| OLD | NEW |