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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 | 1715 |
1710 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1716 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
1711 HLoadFunctionPrototype* instr) { | 1717 HLoadFunctionPrototype* instr) { |
1712 return AssignEnvironment(DefineAsRegister( | 1718 return AssignEnvironment(DefineAsRegister( |
1713 new LLoadFunctionPrototype(UseRegister(instr->function())))); | 1719 new LLoadFunctionPrototype(UseRegister(instr->function())))); |
1714 } | 1720 } |
1715 | 1721 |
1716 | 1722 |
1717 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { | 1723 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { |
1718 LOperand* input = UseRegisterAtStart(instr->value()); | 1724 LOperand* input = UseRegisterAtStart(instr->value()); |
1719 return DefineSameAsFirst(new LLoadElements(input)); | 1725 return DefineAsRegister(new LLoadElements(input)); |
1720 } | 1726 } |
1721 | 1727 |
1722 | 1728 |
| 1729 LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer( |
| 1730 HLoadPixelArrayExternalPointer* instr) { |
| 1731 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1732 return DefineAsRegister(new LLoadPixelArrayExternalPointer(input)); |
| 1733 } |
| 1734 |
| 1735 |
1723 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1736 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
1724 HLoadKeyedFastElement* instr) { | 1737 HLoadKeyedFastElement* instr) { |
1725 ASSERT(instr->representation().IsTagged()); | 1738 ASSERT(instr->representation().IsTagged()); |
1726 ASSERT(instr->key()->representation().IsInteger32()); | 1739 ASSERT(instr->key()->representation().IsInteger32()); |
1727 LOperand* obj = UseRegisterAtStart(instr->object()); | 1740 LOperand* obj = UseRegisterAtStart(instr->object()); |
1728 LOperand* key = UseRegisterAtStart(instr->key()); | 1741 LOperand* key = UseRegisterAtStart(instr->key()); |
1729 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1742 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
1730 return AssignEnvironment(DefineSameAsFirst(result)); | 1743 return AssignEnvironment(DefineSameAsFirst(result)); |
1731 } | 1744 } |
1732 | 1745 |
1733 | 1746 |
| 1747 LInstruction* LChunkBuilder::DoLoadPixelArrayElement( |
| 1748 HLoadPixelArrayElement* instr) { |
| 1749 ASSERT(instr->representation().IsInteger32()); |
| 1750 ASSERT(instr->key()->representation().IsInteger32()); |
| 1751 LOperand* external_pointer = |
| 1752 UseRegisterAtStart(instr->external_pointer()); |
| 1753 LOperand* key = UseRegisterAtStart(instr->key()); |
| 1754 LLoadPixelArrayElement* result = |
| 1755 new LLoadPixelArrayElement(external_pointer, key); |
| 1756 return DefineAsRegister(result); |
| 1757 } |
| 1758 |
| 1759 |
1734 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1760 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
1735 LOperand* object = UseFixed(instr->object(), r1); | 1761 LOperand* object = UseFixed(instr->object(), r1); |
1736 LOperand* key = UseFixed(instr->key(), r0); | 1762 LOperand* key = UseFixed(instr->key(), r0); |
1737 | 1763 |
1738 LInstruction* result = | 1764 LInstruction* result = |
1739 DefineFixed(new LLoadKeyedGeneric(object, key), r0); | 1765 DefineFixed(new LLoadKeyedGeneric(object, key), r0); |
1740 return MarkAsCall(result, instr); | 1766 return MarkAsCall(result, instr); |
1741 } | 1767 } |
1742 | 1768 |
1743 | 1769 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 | 1968 |
1943 | 1969 |
1944 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1970 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1945 HEnvironment* outer = current_block_->last_environment()->outer(); | 1971 HEnvironment* outer = current_block_->last_environment()->outer(); |
1946 current_block_->UpdateEnvironment(outer); | 1972 current_block_->UpdateEnvironment(outer); |
1947 return NULL; | 1973 return NULL; |
1948 } | 1974 } |
1949 | 1975 |
1950 | 1976 |
1951 } } // namespace v8::internal | 1977 } } // namespace v8::internal |
OLD | NEW |