| 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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 return DefineSameAsFirst(new LClassOfTest(value)); | 1493 return DefineSameAsFirst(new LClassOfTest(value)); |
| 1494 } | 1494 } |
| 1495 | 1495 |
| 1496 | 1496 |
| 1497 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { | 1497 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { |
| 1498 LOperand* array = UseRegisterAtStart(instr->value()); | 1498 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1499 return DefineAsRegister(new LJSArrayLength(array)); | 1499 return DefineAsRegister(new LJSArrayLength(array)); |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 | 1502 |
| 1503 LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) { |
| 1504 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1505 return DefineAsRegister(new LPixelArrayLength(array)); |
| 1506 } |
| 1507 |
| 1508 |
| 1503 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { | 1509 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { |
| 1504 LOperand* array = UseRegisterAtStart(instr->value()); | 1510 LOperand* array = UseRegisterAtStart(instr->value()); |
| 1505 return DefineAsRegister(new LFixedArrayLength(array)); | 1511 return DefineAsRegister(new LFixedArrayLength(array)); |
| 1506 } | 1512 } |
| 1507 | 1513 |
| 1508 | 1514 |
| 1509 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1515 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
| 1510 LOperand* object = UseRegister(instr->value()); | 1516 LOperand* object = UseRegister(instr->value()); |
| 1511 LValueOf* result = new LValueOf(object, TempRegister()); | 1517 LValueOf* result = new LValueOf(object, TempRegister()); |
| 1512 return AssignEnvironment(DefineSameAsFirst(result)); | 1518 return AssignEnvironment(DefineSameAsFirst(result)); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 | 1713 |
| 1708 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1714 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 1709 HLoadFunctionPrototype* instr) { | 1715 HLoadFunctionPrototype* instr) { |
| 1710 return AssignEnvironment(DefineAsRegister( | 1716 return AssignEnvironment(DefineAsRegister( |
| 1711 new LLoadFunctionPrototype(UseRegister(instr->function())))); | 1717 new LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 1712 } | 1718 } |
| 1713 | 1719 |
| 1714 | 1720 |
| 1715 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { | 1721 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { |
| 1716 LOperand* input = UseRegisterAtStart(instr->value()); | 1722 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1717 return DefineSameAsFirst(new LLoadElements(input)); | 1723 return DefineAsRegister(new LLoadElements(input)); |
| 1718 } | 1724 } |
| 1719 | 1725 |
| 1720 | 1726 |
| 1727 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer( |
| 1728 HLoadPixelArrayExternalPointer* instr) { |
| 1729 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1730 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input)); |
| 1731 } |
| 1732 |
| 1733 |
| 1721 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1734 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| 1722 HLoadKeyedFastElement* instr) { | 1735 HLoadKeyedFastElement* instr) { |
| 1723 ASSERT(instr->representation().IsTagged()); | 1736 ASSERT(instr->representation().IsTagged()); |
| 1724 ASSERT(instr->key()->representation().IsInteger32()); | 1737 ASSERT(instr->key()->representation().IsInteger32()); |
| 1725 LOperand* obj = UseRegisterAtStart(instr->object()); | 1738 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1726 LOperand* key = UseRegisterAtStart(instr->key()); | 1739 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1727 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1740 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| 1728 return AssignEnvironment(DefineSameAsFirst(result)); | 1741 return AssignEnvironment(DefineSameAsFirst(result)); |
| 1729 } | 1742 } |
| 1730 | 1743 |
| 1731 | 1744 |
| 1745 LInstruction* LChunkBuilder::DoLoadPixelArrayElement( |
| 1746 HLoadPixelArrayElement* instr) { |
| 1747 ASSERT(instr->representation().IsInteger32()); |
| 1748 ASSERT(instr->key()->representation().IsInteger32()); |
| 1749 LOperand* external_pointer = |
| 1750 UseRegisterAtStart(instr->external_pointer()); |
| 1751 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1752 LLoadPixelArrayElement* result = |
| 1753 new LLoadPixelArrayElement(external_pointer, key); |
| 1754 return DefineAsRegister(result); |
| 1755 } |
| 1756 |
| 1757 |
| 1732 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1758 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 1733 LOperand* object = UseFixed(instr->object(), r1); | 1759 LOperand* object = UseFixed(instr->object(), r1); |
| 1734 LOperand* key = UseFixed(instr->key(), r0); | 1760 LOperand* key = UseFixed(instr->key(), r0); |
| 1735 | 1761 |
| 1736 LInstruction* result = | 1762 LInstruction* result = |
| 1737 DefineFixed(new LLoadKeyedGeneric(object, key), r0); | 1763 DefineFixed(new LLoadKeyedGeneric(object, key), r0); |
| 1738 return MarkAsCall(result, instr); | 1764 return MarkAsCall(result, instr); |
| 1739 } | 1765 } |
| 1740 | 1766 |
| 1741 | 1767 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 | 1972 |
| 1947 | 1973 |
| 1948 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1974 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1949 HEnvironment* outer = current_block_->last_environment()->outer(); | 1975 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 1950 current_block_->UpdateEnvironment(outer); | 1976 current_block_->UpdateEnvironment(outer); |
| 1951 return NULL; | 1977 return NULL; |
| 1952 } | 1978 } |
| 1953 | 1979 |
| 1954 | 1980 |
| 1955 } } // namespace v8::internal | 1981 } } // namespace v8::internal |
| OLD | NEW |