Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: src/arm64/lithium-arm64.cc

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_fixed_typed_array()) { 1734 if (!instr->is_typed_elements()) {
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
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 == UINT32_ELEMENTS && 1768 if ((elements_kind == EXTERNAL_UINT32_ELEMENTS ||
1769 elements_kind == UINT32_ELEMENTS) &&
1769 !instr->CheckFlag(HInstruction::kUint32)) { 1770 !instr->CheckFlag(HInstruction::kUint32)) {
1770 result = AssignEnvironment(result); 1771 result = AssignEnvironment(result);
1771 } 1772 }
1772 return result; 1773 return result;
1773 } 1774 }
1774 } 1775 }
1775 1776
1776 1777
1777 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1778 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1778 LOperand* context = UseFixed(instr->context(), cp); 1779 LOperand* context = UseFixed(instr->context(), cp);
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 return result; 2363 return result;
2363 } 2364 }
2364 2365
2365 2366
2366 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2367 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2367 LOperand* key = UseRegisterOrConstant(instr->key()); 2368 LOperand* key = UseRegisterOrConstant(instr->key());
2368 LOperand* temp = NULL; 2369 LOperand* temp = NULL;
2369 LOperand* elements = NULL; 2370 LOperand* elements = NULL;
2370 LOperand* val = NULL; 2371 LOperand* val = NULL;
2371 2372
2372 if (!instr->is_fixed_typed_array() && 2373 if (!instr->is_typed_elements() &&
2373 instr->value()->representation().IsTagged() && 2374 instr->value()->representation().IsTagged() &&
2374 instr->NeedsWriteBarrier()) { 2375 instr->NeedsWriteBarrier()) {
2375 // RecordWrite() will clobber all registers. 2376 // RecordWrite() will clobber all registers.
2376 elements = UseRegisterAndClobber(instr->elements()); 2377 elements = UseRegisterAndClobber(instr->elements());
2377 val = UseRegisterAndClobber(instr->value()); 2378 val = UseRegisterAndClobber(instr->value());
2378 temp = TempRegister(); 2379 temp = TempRegister();
2379 } else { 2380 } else {
2380 elements = UseRegister(instr->elements()); 2381 elements = UseRegister(instr->elements());
2381 val = UseRegister(instr->value()); 2382 val = UseRegister(instr->value());
2382 temp = instr->key()->IsConstant() ? NULL : TempRegister(); 2383 temp = instr->key()->IsConstant() ? NULL : TempRegister();
2383 } 2384 }
2384 2385
2385 if (instr->is_fixed_typed_array()) { 2386 if (instr->is_typed_elements()) {
2386 DCHECK((instr->value()->representation().IsInteger32() && 2387 DCHECK((instr->value()->representation().IsInteger32() &&
2387 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || 2388 !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
2388 (instr->value()->representation().IsDouble() && 2389 (instr->value()->representation().IsDouble() &&
2389 IsDoubleOrFloatElementsKind(instr->elements_kind()))); 2390 IsDoubleOrFloatElementsKind(instr->elements_kind())));
2390 DCHECK(instr->elements()->representation().IsExternal()); 2391 DCHECK(instr->elements()->representation().IsExternal());
2391 return new(zone()) LStoreKeyedExternal(elements, key, val, temp); 2392 return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
2392 2393
2393 } else if (instr->value()->representation().IsDouble()) { 2394 } else if (instr->value()->representation().IsDouble()) {
2394 DCHECK(instr->elements()->representation().IsTagged()); 2395 DCHECK(instr->elements()->representation().IsTagged());
2395 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); 2396 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 LOperand* context = UseFixed(instr->context(), cp); 2815 LOperand* context = UseFixed(instr->context(), cp);
2815 LOperand* function = UseRegisterAtStart(instr->function()); 2816 LOperand* function = UseRegisterAtStart(instr->function());
2816 LAllocateBlockContext* result = 2817 LAllocateBlockContext* result =
2817 new(zone()) LAllocateBlockContext(context, function); 2818 new(zone()) LAllocateBlockContext(context, function);
2818 return MarkAsCall(DefineFixed(result, cp), instr); 2819 return MarkAsCall(DefineFixed(result, cp), instr);
2819 } 2820 }
2820 2821
2821 2822
2822 } // namespace internal 2823 } // namespace internal
2823 } // namespace v8 2824 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698