| 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 return MarkAsCall(DefineFixed(result, x0), instr); | 1724 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 | 1727 |
| 1728 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { | 1728 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
| 1729 DCHECK(instr->key()->representation().IsSmiOrInteger32()); | 1729 DCHECK(instr->key()->representation().IsSmiOrInteger32()); |
| 1730 ElementsKind elements_kind = instr->elements_kind(); | 1730 ElementsKind elements_kind = instr->elements_kind(); |
| 1731 LOperand* elements = UseRegister(instr->elements()); | 1731 LOperand* elements = UseRegister(instr->elements()); |
| 1732 LOperand* key = UseRegisterOrConstant(instr->key()); | 1732 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 1733 | 1733 |
| 1734 if (!instr->is_typed_elements()) { | 1734 if (!instr->is_fixed_typed_array()) { |
| 1735 if (instr->representation().IsDouble()) { | 1735 if (instr->representation().IsDouble()) { |
| 1736 LOperand* temp = (!instr->key()->IsConstant() || | 1736 LOperand* temp = (!instr->key()->IsConstant() || |
| 1737 instr->RequiresHoleCheck()) | 1737 instr->RequiresHoleCheck()) |
| 1738 ? TempRegister() | 1738 ? TempRegister() |
| 1739 : NULL; | 1739 : NULL; |
| 1740 LInstruction* result = DefineAsRegister( | 1740 LInstruction* result = DefineAsRegister( |
| 1741 new (zone()) LLoadKeyedFixedDouble(elements, key, temp)); | 1741 new (zone()) LLoadKeyedFixedDouble(elements, key, temp)); |
| 1742 if (instr->RequiresHoleCheck()) { | 1742 if (instr->RequiresHoleCheck()) { |
| 1743 result = AssignEnvironment(result); | 1743 result = AssignEnvironment(result); |
| 1744 } | 1744 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1758 } | 1758 } |
| 1759 } else { | 1759 } else { |
| 1760 DCHECK((instr->representation().IsInteger32() && | 1760 DCHECK((instr->representation().IsInteger32() && |
| 1761 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 1761 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
| 1762 (instr->representation().IsDouble() && | 1762 (instr->representation().IsDouble() && |
| 1763 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 1763 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 1764 | 1764 |
| 1765 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); | 1765 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
| 1766 LInstruction* result = DefineAsRegister( | 1766 LInstruction* result = DefineAsRegister( |
| 1767 new(zone()) LLoadKeyedExternal(elements, key, temp)); | 1767 new(zone()) LLoadKeyedExternal(elements, key, temp)); |
| 1768 if ((elements_kind == EXTERNAL_UINT32_ELEMENTS || | 1768 if (elements_kind == UINT32_ELEMENTS && |
| 1769 elements_kind == UINT32_ELEMENTS) && | |
| 1770 !instr->CheckFlag(HInstruction::kUint32)) { | 1769 !instr->CheckFlag(HInstruction::kUint32)) { |
| 1771 result = AssignEnvironment(result); | 1770 result = AssignEnvironment(result); |
| 1772 } | 1771 } |
| 1773 return result; | 1772 return result; |
| 1774 } | 1773 } |
| 1775 } | 1774 } |
| 1776 | 1775 |
| 1777 | 1776 |
| 1778 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 1777 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 1779 LOperand* context = UseFixed(instr->context(), cp); | 1778 LOperand* context = UseFixed(instr->context(), cp); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2363 return result; | 2362 return result; |
| 2364 } | 2363 } |
| 2365 | 2364 |
| 2366 | 2365 |
| 2367 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2366 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| 2368 LOperand* key = UseRegisterOrConstant(instr->key()); | 2367 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2369 LOperand* temp = NULL; | 2368 LOperand* temp = NULL; |
| 2370 LOperand* elements = NULL; | 2369 LOperand* elements = NULL; |
| 2371 LOperand* val = NULL; | 2370 LOperand* val = NULL; |
| 2372 | 2371 |
| 2373 if (!instr->is_typed_elements() && | 2372 if (!instr->is_fixed_typed_array() && |
| 2374 instr->value()->representation().IsTagged() && | 2373 instr->value()->representation().IsTagged() && |
| 2375 instr->NeedsWriteBarrier()) { | 2374 instr->NeedsWriteBarrier()) { |
| 2376 // RecordWrite() will clobber all registers. | 2375 // RecordWrite() will clobber all registers. |
| 2377 elements = UseRegisterAndClobber(instr->elements()); | 2376 elements = UseRegisterAndClobber(instr->elements()); |
| 2378 val = UseRegisterAndClobber(instr->value()); | 2377 val = UseRegisterAndClobber(instr->value()); |
| 2379 temp = TempRegister(); | 2378 temp = TempRegister(); |
| 2380 } else { | 2379 } else { |
| 2381 elements = UseRegister(instr->elements()); | 2380 elements = UseRegister(instr->elements()); |
| 2382 val = UseRegister(instr->value()); | 2381 val = UseRegister(instr->value()); |
| 2383 temp = instr->key()->IsConstant() ? NULL : TempRegister(); | 2382 temp = instr->key()->IsConstant() ? NULL : TempRegister(); |
| 2384 } | 2383 } |
| 2385 | 2384 |
| 2386 if (instr->is_typed_elements()) { | 2385 if (instr->is_fixed_typed_array()) { |
| 2387 DCHECK((instr->value()->representation().IsInteger32() && | 2386 DCHECK((instr->value()->representation().IsInteger32() && |
| 2388 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || | 2387 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
| 2389 (instr->value()->representation().IsDouble() && | 2388 (instr->value()->representation().IsDouble() && |
| 2390 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2389 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
| 2391 DCHECK(instr->elements()->representation().IsExternal()); | 2390 DCHECK(instr->elements()->representation().IsExternal()); |
| 2392 return new(zone()) LStoreKeyedExternal(elements, key, val, temp); | 2391 return new(zone()) LStoreKeyedExternal(elements, key, val, temp); |
| 2393 | 2392 |
| 2394 } else if (instr->value()->representation().IsDouble()) { | 2393 } else if (instr->value()->representation().IsDouble()) { |
| 2395 DCHECK(instr->elements()->representation().IsTagged()); | 2394 DCHECK(instr->elements()->representation().IsTagged()); |
| 2396 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); | 2395 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2815 LOperand* context = UseFixed(instr->context(), cp); | 2814 LOperand* context = UseFixed(instr->context(), cp); |
| 2816 LOperand* function = UseRegisterAtStart(instr->function()); | 2815 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2817 LAllocateBlockContext* result = | 2816 LAllocateBlockContext* result = |
| 2818 new(zone()) LAllocateBlockContext(context, function); | 2817 new(zone()) LAllocateBlockContext(context, function); |
| 2819 return MarkAsCall(DefineFixed(result, cp), instr); | 2818 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2820 } | 2819 } |
| 2821 | 2820 |
| 2822 | 2821 |
| 2823 } // namespace internal | 2822 } // namespace internal |
| 2824 } // namespace v8 | 2823 } // namespace v8 |
| OLD | NEW |