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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 | 1512 |
1513 | 1513 |
1514 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1514 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
1515 LOperand* object = UseRegister(instr->value()); | 1515 LOperand* object = UseRegister(instr->value()); |
1516 LValueOf* result = new LValueOf(object); | 1516 LValueOf* result = new LValueOf(object); |
1517 return AssignEnvironment(DefineSameAsFirst(result)); | 1517 return AssignEnvironment(DefineSameAsFirst(result)); |
1518 } | 1518 } |
1519 | 1519 |
1520 | 1520 |
1521 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1521 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
1522 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), | 1522 return AssignEnvironment(new LBoundsCheck( |
1523 Use(instr->length()))); | 1523 UseRegisterOrConstantAtStart(instr->index()), |
| 1524 Use(instr->length()))); |
1524 } | 1525 } |
1525 | 1526 |
1526 | 1527 |
1527 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1528 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
1528 // The control instruction marking the end of a block that completed | 1529 // The control instruction marking the end of a block that completed |
1529 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1530 // abruptly (e.g., threw an exception). There is nothing specific to do. |
1530 return NULL; | 1531 return NULL; |
1531 } | 1532 } |
1532 | 1533 |
1533 | 1534 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 LOperand* input = UseRegisterAtStart(instr->value()); | 1813 LOperand* input = UseRegisterAtStart(instr->value()); |
1813 return DefineAsRegister(new LLoadExternalArrayPointer(input)); | 1814 return DefineAsRegister(new LLoadExternalArrayPointer(input)); |
1814 } | 1815 } |
1815 | 1816 |
1816 | 1817 |
1817 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1818 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
1818 HLoadKeyedFastElement* instr) { | 1819 HLoadKeyedFastElement* instr) { |
1819 ASSERT(instr->representation().IsTagged()); | 1820 ASSERT(instr->representation().IsTagged()); |
1820 ASSERT(instr->key()->representation().IsInteger32()); | 1821 ASSERT(instr->key()->representation().IsInteger32()); |
1821 LOperand* obj = UseRegisterAtStart(instr->object()); | 1822 LOperand* obj = UseRegisterAtStart(instr->object()); |
1822 LOperand* key = UseRegisterAtStart(instr->key()); | 1823 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
1823 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1824 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
1824 return AssignEnvironment(DefineSameAsFirst(result)); | 1825 return AssignEnvironment(DefineAsRegister(result)); |
1825 } | 1826 } |
1826 | 1827 |
1827 | 1828 |
1828 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( | 1829 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( |
1829 HLoadKeyedFastDoubleElement* instr) { | 1830 HLoadKeyedFastDoubleElement* instr) { |
1830 ASSERT(instr->representation().IsDouble()); | 1831 ASSERT(instr->representation().IsDouble()); |
1831 ASSERT(instr->key()->representation().IsInteger32()); | 1832 ASSERT(instr->key()->representation().IsInteger32()); |
1832 LOperand* elements = UseRegisterAtStart(instr->elements()); | 1833 LOperand* elements = UseRegisterAtStart(instr->elements()); |
1833 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 1834 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
1834 LLoadKeyedFastDoubleElement* result = | 1835 LLoadKeyedFastDoubleElement* result = |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 LOperand* key = UseOrConstantAtStart(instr->key()); | 2168 LOperand* key = UseOrConstantAtStart(instr->key()); |
2168 LOperand* object = UseOrConstantAtStart(instr->object()); | 2169 LOperand* object = UseOrConstantAtStart(instr->object()); |
2169 LIn* result = new LIn(key, object); | 2170 LIn* result = new LIn(key, object); |
2170 return MarkAsCall(DefineFixed(result, rax), instr); | 2171 return MarkAsCall(DefineFixed(result, rax), instr); |
2171 } | 2172 } |
2172 | 2173 |
2173 | 2174 |
2174 } } // namespace v8::internal | 2175 } } // namespace v8::internal |
2175 | 2176 |
2176 #endif // V8_TARGET_ARCH_X64 | 2177 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |