| 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-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
| 8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
| 9 #include "src/lithium-inl.h" | 9 #include "src/lithium-inl.h" |
| 10 | 10 |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 LOperand* function = UseFixed(instr->function(), x1); | 1029 LOperand* function = UseFixed(instr->function(), x1); |
| 1030 | 1030 |
| 1031 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1031 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
| 1032 | 1032 |
| 1033 return MarkAsCall(DefineFixed(result, x0), instr); | 1033 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 | 1036 |
| 1037 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1037 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
| 1038 HCallWithDescriptor* instr) { | 1038 HCallWithDescriptor* instr) { |
| 1039 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1039 CallInterfaceDescriptor descriptor = instr->descriptor(); |
| 1040 | 1040 |
| 1041 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1041 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
| 1042 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1042 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
| 1043 ops.Add(target, zone()); | 1043 ops.Add(target, zone()); |
| 1044 for (int i = 1; i < instr->OperandCount(); i++) { | 1044 for (int i = 1; i < instr->OperandCount(); i++) { |
| 1045 LOperand* op = UseFixed(instr->OperandAt(i), | 1045 LOperand* op = |
| 1046 descriptor->GetParameterRegister(i - 1)); | 1046 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); |
| 1047 ops.Add(op, zone()); | 1047 ops.Add(op, zone()); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(descriptor, | 1050 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(descriptor, |
| 1051 ops, | 1051 ops, |
| 1052 zone()); | 1052 zone()); |
| 1053 return MarkAsCall(DefineFixed(result, x0), instr); | 1053 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 | 1056 |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell(); | 1658 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell(); |
| 1659 return instr->RequiresHoleCheck() | 1659 return instr->RequiresHoleCheck() |
| 1660 ? AssignEnvironment(DefineAsRegister(result)) | 1660 ? AssignEnvironment(DefineAsRegister(result)) |
| 1661 : DefineAsRegister(result); | 1661 : DefineAsRegister(result); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 | 1664 |
| 1665 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1665 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 1666 LOperand* context = UseFixed(instr->context(), cp); | 1666 LOperand* context = UseFixed(instr->context(), cp); |
| 1667 LOperand* global_object = | 1667 LOperand* global_object = |
| 1668 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); | 1668 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
| 1669 LOperand* vector = NULL; | 1669 LOperand* vector = NULL; |
| 1670 if (FLAG_vector_ics) { | 1670 if (FLAG_vector_ics) { |
| 1671 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 1671 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 LLoadGlobalGeneric* result = | 1674 LLoadGlobalGeneric* result = |
| 1675 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 1675 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 1676 return MarkAsCall(DefineFixed(result, x0), instr); | 1676 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1677 } | 1677 } |
| 1678 | 1678 |
| 1679 | 1679 |
| 1680 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { | 1680 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
| 1681 DCHECK(instr->key()->representation().IsSmiOrInteger32()); | 1681 DCHECK(instr->key()->representation().IsSmiOrInteger32()); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1720 result = AssignEnvironment(result); | 1720 result = AssignEnvironment(result); |
| 1721 } | 1721 } |
| 1722 return result; | 1722 return result; |
| 1723 } | 1723 } |
| 1724 } | 1724 } |
| 1725 | 1725 |
| 1726 | 1726 |
| 1727 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1727 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 1728 LOperand* context = UseFixed(instr->context(), cp); | 1728 LOperand* context = UseFixed(instr->context(), cp); |
| 1729 LOperand* object = | 1729 LOperand* object = |
| 1730 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); | 1730 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 1731 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); | 1731 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
| 1732 LOperand* vector = NULL; | 1732 LOperand* vector = NULL; |
| 1733 if (FLAG_vector_ics) { | 1733 if (FLAG_vector_ics) { |
| 1734 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 1734 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 LInstruction* result = | 1737 LInstruction* result = |
| 1738 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), | 1738 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
| 1739 x0); | 1739 x0); |
| 1740 return MarkAsCall(result, instr); | 1740 return MarkAsCall(result, instr); |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 | 1743 |
| 1744 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1744 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 1745 LOperand* object = UseRegisterAtStart(instr->object()); | 1745 LOperand* object = UseRegisterAtStart(instr->object()); |
| 1746 return DefineAsRegister(new(zone()) LLoadNamedField(object)); | 1746 return DefineAsRegister(new(zone()) LLoadNamedField(object)); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 | 1749 |
| 1750 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1750 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 1751 LOperand* context = UseFixed(instr->context(), cp); | 1751 LOperand* context = UseFixed(instr->context(), cp); |
| 1752 LOperand* object = | 1752 LOperand* object = |
| 1753 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); | 1753 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
| 1754 LOperand* vector = NULL; | 1754 LOperand* vector = NULL; |
| 1755 if (FLAG_vector_ics) { | 1755 if (FLAG_vector_ics) { |
| 1756 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 1756 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
| 1757 } | 1757 } |
| 1758 | 1758 |
| 1759 LInstruction* result = | 1759 LInstruction* result = |
| 1760 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), x0); | 1760 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), x0); |
| 1761 return MarkAsCall(result, instr); | 1761 return MarkAsCall(result, instr); |
| 1762 } | 1762 } |
| 1763 | 1763 |
| 1764 | 1764 |
| 1765 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { | 1765 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { |
| 1766 return DefineAsRegister(new(zone()) LLoadRoot); | 1766 return DefineAsRegister(new(zone()) LLoadRoot); |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2363 DCHECK(instr->value()->representation().IsSmiOrTagged() || | 2363 DCHECK(instr->value()->representation().IsSmiOrTagged() || |
| 2364 instr->value()->representation().IsInteger32()); | 2364 instr->value()->representation().IsInteger32()); |
| 2365 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); | 2365 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); |
| 2366 } | 2366 } |
| 2367 } | 2367 } |
| 2368 | 2368 |
| 2369 | 2369 |
| 2370 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2370 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 2371 LOperand* context = UseFixed(instr->context(), cp); | 2371 LOperand* context = UseFixed(instr->context(), cp); |
| 2372 LOperand* object = | 2372 LOperand* object = |
| 2373 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); | 2373 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
| 2374 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); | 2374 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
| 2375 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); | 2375 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
| 2376 | 2376 |
| 2377 DCHECK(instr->object()->representation().IsTagged()); | 2377 DCHECK(instr->object()->representation().IsTagged()); |
| 2378 DCHECK(instr->key()->representation().IsTagged()); | 2378 DCHECK(instr->key()->representation().IsTagged()); |
| 2379 DCHECK(instr->value()->representation().IsTagged()); | 2379 DCHECK(instr->value()->representation().IsTagged()); |
| 2380 | 2380 |
| 2381 return MarkAsCall( | 2381 return MarkAsCall( |
| 2382 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); | 2382 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); |
| 2383 } | 2383 } |
| 2384 | 2384 |
| 2385 | 2385 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2408 temp0 = TempRegister(); | 2408 temp0 = TempRegister(); |
| 2409 } | 2409 } |
| 2410 | 2410 |
| 2411 return new(zone()) LStoreNamedField(object, value, temp0, temp1); | 2411 return new(zone()) LStoreNamedField(object, value, temp0, temp1); |
| 2412 } | 2412 } |
| 2413 | 2413 |
| 2414 | 2414 |
| 2415 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2415 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2416 LOperand* context = UseFixed(instr->context(), cp); | 2416 LOperand* context = UseFixed(instr->context(), cp); |
| 2417 LOperand* object = | 2417 LOperand* object = |
| 2418 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); | 2418 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
| 2419 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister()); | 2419 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
| 2420 | 2420 |
| 2421 LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value); | 2421 LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value); |
| 2422 return MarkAsCall(result, instr); | 2422 return MarkAsCall(result, instr); |
| 2423 } | 2423 } |
| 2424 | 2424 |
| 2425 | 2425 |
| 2426 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2426 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2427 LOperand* context = UseFixed(instr->context(), cp); | 2427 LOperand* context = UseFixed(instr->context(), cp); |
| 2428 LOperand* left = UseFixed(instr->left(), x1); | 2428 LOperand* left = UseFixed(instr->left(), x1); |
| 2429 LOperand* right = UseFixed(instr->right(), x0); | 2429 LOperand* right = UseFixed(instr->right(), x0); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 HAllocateBlockContext* instr) { | 2737 HAllocateBlockContext* instr) { |
| 2738 LOperand* context = UseFixed(instr->context(), cp); | 2738 LOperand* context = UseFixed(instr->context(), cp); |
| 2739 LOperand* function = UseRegisterAtStart(instr->function()); | 2739 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2740 LAllocateBlockContext* result = | 2740 LAllocateBlockContext* result = |
| 2741 new(zone()) LAllocateBlockContext(context, function); | 2741 new(zone()) LAllocateBlockContext(context, function); |
| 2742 return MarkAsCall(DefineFixed(result, cp), instr); | 2742 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2743 } | 2743 } |
| 2744 | 2744 |
| 2745 | 2745 |
| 2746 } } // namespace v8::internal | 2746 } } // namespace v8::internal |
| OLD | NEW |