OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-arm64.h" | 7 #include "src/arm64/lithium-arm64.h" |
8 #include "src/arm64/lithium-codegen-arm64.h" | 8 #include "src/arm64/lithium-codegen-arm64.h" |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 int index = GetNextSpillIndex(); | 544 int index = GetNextSpillIndex(); |
545 if (kind == DOUBLE_REGISTERS) { | 545 if (kind == DOUBLE_REGISTERS) { |
546 return LDoubleStackSlot::Create(index, zone()); | 546 return LDoubleStackSlot::Create(index, zone()); |
547 } else { | 547 } else { |
548 ASSERT(kind == GENERAL_REGISTERS); | 548 ASSERT(kind == GENERAL_REGISTERS); |
549 return LStackSlot::Create(index, zone()); | 549 return LStackSlot::Create(index, zone()); |
550 } | 550 } |
551 } | 551 } |
552 | 552 |
553 | 553 |
| 554 LOperand* LChunkBuilder::FixedTemp(Register reg) { |
| 555 LUnallocated* operand = ToUnallocated(reg); |
| 556 ASSERT(operand->HasFixedPolicy()); |
| 557 return operand; |
| 558 } |
| 559 |
| 560 |
554 LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) { | 561 LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) { |
555 LUnallocated* operand = ToUnallocated(reg); | 562 LUnallocated* operand = ToUnallocated(reg); |
556 ASSERT(operand->HasFixedPolicy()); | 563 ASSERT(operand->HasFixedPolicy()); |
557 return operand; | 564 return operand; |
558 } | 565 } |
559 | 566 |
560 | 567 |
561 LPlatformChunk* LChunkBuilder::Build() { | 568 LPlatformChunk* LChunkBuilder::Build() { |
562 ASSERT(is_unused()); | 569 ASSERT(is_unused()); |
563 chunk_ = new(zone()) LPlatformChunk(info_, graph_); | 570 chunk_ = new(zone()) LPlatformChunk(info_, graph_); |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 return instr->RequiresHoleCheck() | 1660 return instr->RequiresHoleCheck() |
1654 ? AssignEnvironment(DefineAsRegister(result)) | 1661 ? AssignEnvironment(DefineAsRegister(result)) |
1655 : DefineAsRegister(result); | 1662 : DefineAsRegister(result); |
1656 } | 1663 } |
1657 | 1664 |
1658 | 1665 |
1659 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1666 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1660 LOperand* context = UseFixed(instr->context(), cp); | 1667 LOperand* context = UseFixed(instr->context(), cp); |
1661 LOperand* global_object = UseFixed(instr->global_object(), | 1668 LOperand* global_object = UseFixed(instr->global_object(), |
1662 LoadIC::ReceiverRegister()); | 1669 LoadIC::ReceiverRegister()); |
| 1670 LOperand* vector = NULL; |
| 1671 if (FLAG_vector_ics) { |
| 1672 vector = FixedTemp(LoadIC::VectorRegister()); |
| 1673 } |
| 1674 |
1663 LLoadGlobalGeneric* result = | 1675 LLoadGlobalGeneric* result = |
1664 new(zone()) LLoadGlobalGeneric(context, global_object); | 1676 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
1665 return MarkAsCall(DefineFixed(result, x0), instr); | 1677 return MarkAsCall(DefineFixed(result, x0), instr); |
1666 } | 1678 } |
1667 | 1679 |
1668 | 1680 |
1669 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { | 1681 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
1670 ASSERT(instr->key()->representation().IsSmiOrInteger32()); | 1682 ASSERT(instr->key()->representation().IsSmiOrInteger32()); |
1671 ElementsKind elements_kind = instr->elements_kind(); | 1683 ElementsKind elements_kind = instr->elements_kind(); |
1672 LOperand* elements = UseRegister(instr->elements()); | 1684 LOperand* elements = UseRegister(instr->elements()); |
1673 LOperand* key = UseRegisterOrConstant(instr->key()); | 1685 LOperand* key = UseRegisterOrConstant(instr->key()); |
1674 | 1686 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 } | 1722 } |
1711 return result; | 1723 return result; |
1712 } | 1724 } |
1713 } | 1725 } |
1714 | 1726 |
1715 | 1727 |
1716 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1728 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
1717 LOperand* context = UseFixed(instr->context(), cp); | 1729 LOperand* context = UseFixed(instr->context(), cp); |
1718 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 1730 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
1719 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 1731 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); |
| 1732 LOperand* vector = NULL; |
| 1733 if (FLAG_vector_ics) { |
| 1734 vector = FixedTemp(LoadIC::VectorRegister()); |
| 1735 } |
1720 | 1736 |
1721 LInstruction* result = | 1737 LInstruction* result = |
1722 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), x0); | 1738 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
| 1739 x0); |
1723 return MarkAsCall(result, instr); | 1740 return MarkAsCall(result, instr); |
1724 } | 1741 } |
1725 | 1742 |
1726 | 1743 |
1727 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1744 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
1728 LOperand* object = UseRegisterAtStart(instr->object()); | 1745 LOperand* object = UseRegisterAtStart(instr->object()); |
1729 return DefineAsRegister(new(zone()) LLoadNamedField(object)); | 1746 return DefineAsRegister(new(zone()) LLoadNamedField(object)); |
1730 } | 1747 } |
1731 | 1748 |
1732 | 1749 |
1733 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1750 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
1734 LOperand* context = UseFixed(instr->context(), cp); | 1751 LOperand* context = UseFixed(instr->context(), cp); |
1735 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 1752 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); |
| 1753 LOperand* vector = NULL; |
| 1754 if (FLAG_vector_ics) { |
| 1755 vector = FixedTemp(LoadIC::VectorRegister()); |
| 1756 } |
| 1757 |
1736 LInstruction* result = | 1758 LInstruction* result = |
1737 DefineFixed(new(zone()) LLoadNamedGeneric(context, object), x0); | 1759 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), x0); |
1738 return MarkAsCall(result, instr); | 1760 return MarkAsCall(result, instr); |
1739 } | 1761 } |
1740 | 1762 |
1741 | 1763 |
1742 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { | 1764 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { |
1743 return DefineAsRegister(new(zone()) LLoadRoot); | 1765 return DefineAsRegister(new(zone()) LLoadRoot); |
1744 } | 1766 } |
1745 | 1767 |
1746 | 1768 |
1747 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { | 1769 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2719 HAllocateBlockContext* instr) { | 2741 HAllocateBlockContext* instr) { |
2720 LOperand* context = UseFixed(instr->context(), cp); | 2742 LOperand* context = UseFixed(instr->context(), cp); |
2721 LOperand* function = UseRegisterAtStart(instr->function()); | 2743 LOperand* function = UseRegisterAtStart(instr->function()); |
2722 LAllocateBlockContext* result = | 2744 LAllocateBlockContext* result = |
2723 new(zone()) LAllocateBlockContext(context, function); | 2745 new(zone()) LAllocateBlockContext(context, function); |
2724 return MarkAsCall(DefineFixed(result, cp), instr); | 2746 return MarkAsCall(DefineFixed(result, cp), instr); |
2725 } | 2747 } |
2726 | 2748 |
2727 | 2749 |
2728 } } // namespace v8::internal | 2750 } } // namespace v8::internal |
OLD | NEW |