| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/arm64/lithium-codegen-arm64.h" | 9 #include "src/arm64/lithium-codegen-arm64.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 ElementsKind elements_kind = instr->elements_kind(); | 1705 ElementsKind elements_kind = instr->elements_kind(); |
| 1706 LOperand* elements = UseRegister(instr->elements()); | 1706 LOperand* elements = UseRegister(instr->elements()); |
| 1707 LOperand* key = UseRegisterOrConstant(instr->key()); | 1707 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 1708 | 1708 |
| 1709 if (!instr->is_typed_elements()) { | 1709 if (!instr->is_typed_elements()) { |
| 1710 if (instr->representation().IsDouble()) { | 1710 if (instr->representation().IsDouble()) { |
| 1711 LOperand* temp = (!instr->key()->IsConstant() || | 1711 LOperand* temp = (!instr->key()->IsConstant() || |
| 1712 instr->RequiresHoleCheck()) | 1712 instr->RequiresHoleCheck()) |
| 1713 ? TempRegister() | 1713 ? TempRegister() |
| 1714 : NULL; | 1714 : NULL; |
| 1715 | 1715 LInstruction* result = DefineAsRegister( |
| 1716 LLoadKeyedFixedDouble* result = | 1716 new (zone()) LLoadKeyedFixedDouble(elements, key, temp)); |
| 1717 new(zone()) LLoadKeyedFixedDouble(elements, key, temp); | 1717 if (instr->RequiresHoleCheck()) { |
| 1718 return instr->RequiresHoleCheck() | 1718 result = AssignEnvironment(result); |
| 1719 ? AssignEnvironment(DefineAsRegister(result)) | 1719 } |
| 1720 : DefineAsRegister(result); | 1720 return result; |
| 1721 } else { | 1721 } else { |
| 1722 DCHECK(instr->representation().IsSmiOrTagged() || | 1722 DCHECK(instr->representation().IsSmiOrTagged() || |
| 1723 instr->representation().IsInteger32()); | 1723 instr->representation().IsInteger32()); |
| 1724 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); | 1724 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
| 1725 LLoadKeyedFixed* result = | 1725 LInstruction* result = |
| 1726 new(zone()) LLoadKeyedFixed(elements, key, temp); | 1726 DefineAsRegister(new (zone()) LLoadKeyedFixed(elements, key, temp)); |
| 1727 return instr->RequiresHoleCheck() | 1727 if (instr->RequiresHoleCheck() || |
| 1728 ? AssignEnvironment(DefineAsRegister(result)) | 1728 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && |
| 1729 : DefineAsRegister(result); | 1729 info()->IsStub())) { |
| 1730 result = AssignEnvironment(result); |
| 1731 } |
| 1732 return result; |
| 1730 } | 1733 } |
| 1731 } else { | 1734 } else { |
| 1732 DCHECK((instr->representation().IsInteger32() && | 1735 DCHECK((instr->representation().IsInteger32() && |
| 1733 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 1736 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
| 1734 (instr->representation().IsDouble() && | 1737 (instr->representation().IsDouble() && |
| 1735 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 1738 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 1736 | 1739 |
| 1737 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); | 1740 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
| 1738 LInstruction* result = DefineAsRegister( | 1741 LInstruction* result = DefineAsRegister( |
| 1739 new(zone()) LLoadKeyedExternal(elements, key, temp)); | 1742 new(zone()) LLoadKeyedExternal(elements, key, temp)); |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2749 HAllocateBlockContext* instr) { | 2752 HAllocateBlockContext* instr) { |
| 2750 LOperand* context = UseFixed(instr->context(), cp); | 2753 LOperand* context = UseFixed(instr->context(), cp); |
| 2751 LOperand* function = UseRegisterAtStart(instr->function()); | 2754 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2752 LAllocateBlockContext* result = | 2755 LAllocateBlockContext* result = |
| 2753 new(zone()) LAllocateBlockContext(context, function); | 2756 new(zone()) LAllocateBlockContext(context, function); |
| 2754 return MarkAsCall(DefineFixed(result, cp), instr); | 2757 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2755 } | 2758 } |
| 2756 | 2759 |
| 2757 | 2760 |
| 2758 } } // namespace v8::internal | 2761 } } // namespace v8::internal |
| OLD | NEW |