| 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 | 1522 |
| 1523 | 1523 |
| 1524 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | 1524 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
| 1525 LOperand* object = UseRegister(instr->value()); | 1525 LOperand* object = UseRegister(instr->value()); |
| 1526 LValueOf* result = new LValueOf(object); | 1526 LValueOf* result = new LValueOf(object); |
| 1527 return AssignEnvironment(DefineSameAsFirst(result)); | 1527 return AssignEnvironment(DefineSameAsFirst(result)); |
| 1528 } | 1528 } |
| 1529 | 1529 |
| 1530 | 1530 |
| 1531 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1531 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
| 1532 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), | 1532 return AssignEnvironment(new LBoundsCheck( |
| 1533 Use(instr->length()))); | 1533 UseRegisterOrConstantAtStart(instr->index()), |
| 1534 Use(instr->length()))); |
| 1534 } | 1535 } |
| 1535 | 1536 |
| 1536 | 1537 |
| 1537 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1538 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
| 1538 // The control instruction marking the end of a block that completed | 1539 // The control instruction marking the end of a block that completed |
| 1539 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1540 // abruptly (e.g., threw an exception). There is nothing specific to do. |
| 1540 return NULL; | 1541 return NULL; |
| 1541 } | 1542 } |
| 1542 | 1543 |
| 1543 | 1544 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 LOperand* input = UseRegisterAtStart(instr->value()); | 1823 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1823 return DefineAsRegister(new LLoadExternalArrayPointer(input)); | 1824 return DefineAsRegister(new LLoadExternalArrayPointer(input)); |
| 1824 } | 1825 } |
| 1825 | 1826 |
| 1826 | 1827 |
| 1827 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1828 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| 1828 HLoadKeyedFastElement* instr) { | 1829 HLoadKeyedFastElement* instr) { |
| 1829 ASSERT(instr->representation().IsTagged()); | 1830 ASSERT(instr->representation().IsTagged()); |
| 1830 ASSERT(instr->key()->representation().IsInteger32()); | 1831 ASSERT(instr->key()->representation().IsInteger32()); |
| 1831 LOperand* obj = UseRegisterAtStart(instr->object()); | 1832 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1832 LOperand* key = UseRegisterAtStart(instr->key()); | 1833 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1833 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); | 1834 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| 1834 return AssignEnvironment(DefineSameAsFirst(result)); | 1835 return AssignEnvironment(DefineAsRegister(result)); |
| 1835 } | 1836 } |
| 1836 | 1837 |
| 1837 | 1838 |
| 1838 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( | 1839 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( |
| 1839 HLoadKeyedFastDoubleElement* instr) { | 1840 HLoadKeyedFastDoubleElement* instr) { |
| 1840 ASSERT(instr->representation().IsDouble()); | 1841 ASSERT(instr->representation().IsDouble()); |
| 1841 ASSERT(instr->key()->representation().IsInteger32()); | 1842 ASSERT(instr->key()->representation().IsInteger32()); |
| 1842 LOperand* elements = UseRegisterAtStart(instr->elements()); | 1843 LOperand* elements = UseRegisterAtStart(instr->elements()); |
| 1843 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 1844 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1844 LLoadKeyedFastDoubleElement* result = | 1845 LLoadKeyedFastDoubleElement* result = |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2177 LOperand* key = UseOrConstantAtStart(instr->key()); | 2178 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2178 LOperand* object = UseOrConstantAtStart(instr->object()); | 2179 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2179 LIn* result = new LIn(key, object); | 2180 LIn* result = new LIn(key, object); |
| 2180 return MarkAsCall(DefineFixed(result, rax), instr); | 2181 return MarkAsCall(DefineFixed(result, rax), instr); |
| 2181 } | 2182 } |
| 2182 | 2183 |
| 2183 | 2184 |
| 2184 } } // namespace v8::internal | 2185 } } // namespace v8::internal |
| 2185 | 2186 |
| 2186 #endif // V8_TARGET_ARCH_X64 | 2187 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |