| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 LOperand* constructor = UseFixed(instr->constructor(), rdi); | 1178 LOperand* constructor = UseFixed(instr->constructor(), rdi); |
| 1179 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); | 1179 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); |
| 1180 return MarkAsCall(DefineFixed(result, rax), instr); | 1180 return MarkAsCall(DefineFixed(result, rax), instr); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 | 1183 |
| 1184 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1184 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1185 LOperand* context = UseFixed(instr->context(), rsi); | 1185 LOperand* context = UseFixed(instr->context(), rsi); |
| 1186 LOperand* function = UseFixed(instr->function(), rdi); | 1186 LOperand* function = UseFixed(instr->function(), rdi); |
| 1187 LCallFunction* call = new(zone()) LCallFunction(context, function); | 1187 LCallFunction* call = new(zone()) LCallFunction(context, function); |
| 1188 LInstruction* result = DefineFixed(call, rax); | 1188 return MarkAsCall(DefineFixed(call, rax), instr); |
| 1189 if (instr->IsTailCall()) return result; | |
| 1190 return MarkAsCall(result, instr); | |
| 1191 } | 1189 } |
| 1192 | 1190 |
| 1193 | 1191 |
| 1194 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1192 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
| 1195 LOperand* context = UseFixed(instr->context(), rsi); | 1193 LOperand* context = UseFixed(instr->context(), rsi); |
| 1196 LCallRuntime* result = new(zone()) LCallRuntime(context); | 1194 LCallRuntime* result = new(zone()) LCallRuntime(context); |
| 1197 return MarkAsCall(DefineFixed(result, rax), instr); | 1195 return MarkAsCall(DefineFixed(result, rax), instr); |
| 1198 } | 1196 } |
| 1199 | 1197 |
| 1200 | 1198 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 TempRegister()); | 1597 TempRegister()); |
| 1600 } | 1598 } |
| 1601 | 1599 |
| 1602 | 1600 |
| 1603 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { | 1601 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { |
| 1604 LOperand* map = UseRegisterAtStart(instr->value()); | 1602 LOperand* map = UseRegisterAtStart(instr->value()); |
| 1605 return DefineAsRegister(new(zone()) LMapEnumLength(map)); | 1603 return DefineAsRegister(new(zone()) LMapEnumLength(map)); |
| 1606 } | 1604 } |
| 1607 | 1605 |
| 1608 | 1606 |
| 1609 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { | |
| 1610 LOperand* object = UseRegisterAtStart(instr->value()); | |
| 1611 return DefineAsRegister(new(zone()) LElementsKind(object)); | |
| 1612 } | |
| 1613 | |
| 1614 | |
| 1615 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | |
| 1616 LOperand* object = UseRegister(instr->value()); | |
| 1617 LValueOf* result = new(zone()) LValueOf(object); | |
| 1618 return DefineSameAsFirst(result); | |
| 1619 } | |
| 1620 | |
| 1621 | |
| 1622 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { | 1607 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { |
| 1623 LOperand* object = UseFixed(instr->value(), rax); | 1608 LOperand* object = UseFixed(instr->value(), rax); |
| 1624 LDateField* result = new(zone()) LDateField(object, instr->index()); | 1609 LDateField* result = new(zone()) LDateField(object, instr->index()); |
| 1625 return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY); | 1610 return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY); |
| 1626 } | 1611 } |
| 1627 | 1612 |
| 1628 | 1613 |
| 1629 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1614 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
| 1630 LOperand* string = UseRegisterAtStart(instr->string()); | 1615 LOperand* string = UseRegisterAtStart(instr->string()); |
| 1631 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); | 1616 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 } | 1650 } |
| 1666 | 1651 |
| 1667 | 1652 |
| 1668 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1653 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
| 1669 // The control instruction marking the end of a block that completed | 1654 // The control instruction marking the end of a block that completed |
| 1670 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1655 // abruptly (e.g., threw an exception). There is nothing specific to do. |
| 1671 return NULL; | 1656 return NULL; |
| 1672 } | 1657 } |
| 1673 | 1658 |
| 1674 | 1659 |
| 1675 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { | |
| 1676 LOperand* context = UseFixed(instr->context(), rsi); | |
| 1677 LOperand* value = UseFixed(instr->value(), rax); | |
| 1678 return MarkAsCall(new(zone()) LThrow(context, value), instr); | |
| 1679 } | |
| 1680 | |
| 1681 | |
| 1682 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { | 1660 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { |
| 1683 return NULL; | 1661 return NULL; |
| 1684 } | 1662 } |
| 1685 | 1663 |
| 1686 | 1664 |
| 1687 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { | 1665 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { |
| 1688 // All HForceRepresentation instructions should be eliminated in the | 1666 // All HForceRepresentation instructions should be eliminated in the |
| 1689 // representation change phase of Hydrogen. | 1667 // representation change phase of Hydrogen. |
| 1690 UNREACHABLE(); | 1668 UNREACHABLE(); |
| 1691 return NULL; | 1669 return NULL; |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2425 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2448 LOperand* object = UseRegister(instr->object()); | 2426 LOperand* object = UseRegister(instr->object()); |
| 2449 LOperand* index = UseTempRegister(instr->index()); | 2427 LOperand* index = UseTempRegister(instr->index()); |
| 2450 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2428 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2451 } | 2429 } |
| 2452 | 2430 |
| 2453 | 2431 |
| 2454 } } // namespace v8::internal | 2432 } } // namespace v8::internal |
| 2455 | 2433 |
| 2456 #endif // V8_TARGET_ARCH_X64 | 2434 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |