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

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

Issue 1262583002: Reland of "Remove ExternalArray, derived types, and element kinds" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 return MarkAsCall(DefineFixed(result, x0), instr); 1721 return MarkAsCall(DefineFixed(result, x0), instr);
1722 } 1722 }
1723 1723
1724 1724
1725 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 1725 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
1726 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 1726 DCHECK(instr->key()->representation().IsSmiOrInteger32());
1727 ElementsKind elements_kind = instr->elements_kind(); 1727 ElementsKind elements_kind = instr->elements_kind();
1728 LOperand* elements = UseRegister(instr->elements()); 1728 LOperand* elements = UseRegister(instr->elements());
1729 LOperand* key = UseRegisterOrConstant(instr->key()); 1729 LOperand* key = UseRegisterOrConstant(instr->key());
1730 1730
1731 if (!instr->is_typed_elements()) { 1731 if (!instr->is_fixed_typed_array()) {
1732 if (instr->representation().IsDouble()) { 1732 if (instr->representation().IsDouble()) {
1733 LOperand* temp = (!instr->key()->IsConstant() || 1733 LOperand* temp = (!instr->key()->IsConstant() ||
1734 instr->RequiresHoleCheck()) 1734 instr->RequiresHoleCheck())
1735 ? TempRegister() 1735 ? TempRegister()
1736 : NULL; 1736 : NULL;
1737 LInstruction* result = DefineAsRegister( 1737 LInstruction* result = DefineAsRegister(
1738 new (zone()) LLoadKeyedFixedDouble(elements, key, temp)); 1738 new (zone()) LLoadKeyedFixedDouble(elements, key, temp));
1739 if (instr->RequiresHoleCheck()) { 1739 if (instr->RequiresHoleCheck()) {
1740 result = AssignEnvironment(result); 1740 result = AssignEnvironment(result);
1741 } 1741 }
(...skipping 13 matching lines...) Expand all
1755 } 1755 }
1756 } else { 1756 } else {
1757 DCHECK((instr->representation().IsInteger32() && 1757 DCHECK((instr->representation().IsInteger32() &&
1758 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || 1758 !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
1759 (instr->representation().IsDouble() && 1759 (instr->representation().IsDouble() &&
1760 IsDoubleOrFloatElementsKind(instr->elements_kind()))); 1760 IsDoubleOrFloatElementsKind(instr->elements_kind())));
1761 1761
1762 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister(); 1762 LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister();
1763 LInstruction* result = DefineAsRegister( 1763 LInstruction* result = DefineAsRegister(
1764 new(zone()) LLoadKeyedExternal(elements, key, temp)); 1764 new(zone()) LLoadKeyedExternal(elements, key, temp));
1765 if ((elements_kind == EXTERNAL_UINT32_ELEMENTS || 1765 if (elements_kind == UINT32_ELEMENTS &&
1766 elements_kind == UINT32_ELEMENTS) &&
1767 !instr->CheckFlag(HInstruction::kUint32)) { 1766 !instr->CheckFlag(HInstruction::kUint32)) {
1768 result = AssignEnvironment(result); 1767 result = AssignEnvironment(result);
1769 } 1768 }
1770 return result; 1769 return result;
1771 } 1770 }
1772 } 1771 }
1773 1772
1774 1773
1775 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1774 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1776 LOperand* context = UseFixed(instr->context(), cp); 1775 LOperand* context = UseFixed(instr->context(), cp);
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 return result; 2359 return result;
2361 } 2360 }
2362 2361
2363 2362
2364 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2363 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2365 LOperand* key = UseRegisterOrConstant(instr->key()); 2364 LOperand* key = UseRegisterOrConstant(instr->key());
2366 LOperand* temp = NULL; 2365 LOperand* temp = NULL;
2367 LOperand* elements = NULL; 2366 LOperand* elements = NULL;
2368 LOperand* val = NULL; 2367 LOperand* val = NULL;
2369 2368
2370 if (!instr->is_typed_elements() && 2369 if (!instr->is_fixed_typed_array() &&
2371 instr->value()->representation().IsTagged() && 2370 instr->value()->representation().IsTagged() &&
2372 instr->NeedsWriteBarrier()) { 2371 instr->NeedsWriteBarrier()) {
2373 // RecordWrite() will clobber all registers. 2372 // RecordWrite() will clobber all registers.
2374 elements = UseRegisterAndClobber(instr->elements()); 2373 elements = UseRegisterAndClobber(instr->elements());
2375 val = UseRegisterAndClobber(instr->value()); 2374 val = UseRegisterAndClobber(instr->value());
2376 temp = TempRegister(); 2375 temp = TempRegister();
2377 } else { 2376 } else {
2378 elements = UseRegister(instr->elements()); 2377 elements = UseRegister(instr->elements());
2379 val = UseRegister(instr->value()); 2378 val = UseRegister(instr->value());
2380 temp = instr->key()->IsConstant() ? NULL : TempRegister(); 2379 temp = instr->key()->IsConstant() ? NULL : TempRegister();
2381 } 2380 }
2382 2381
2383 if (instr->is_typed_elements()) { 2382 if (instr->is_fixed_typed_array()) {
2384 DCHECK((instr->value()->representation().IsInteger32() && 2383 DCHECK((instr->value()->representation().IsInteger32() &&
2385 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || 2384 !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
2386 (instr->value()->representation().IsDouble() && 2385 (instr->value()->representation().IsDouble() &&
2387 IsDoubleOrFloatElementsKind(instr->elements_kind()))); 2386 IsDoubleOrFloatElementsKind(instr->elements_kind())));
2388 DCHECK(instr->elements()->representation().IsExternal()); 2387 DCHECK(instr->elements()->representation().IsExternal());
2389 return new(zone()) LStoreKeyedExternal(elements, key, val, temp); 2388 return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
2390 2389
2391 } else if (instr->value()->representation().IsDouble()) { 2390 } else if (instr->value()->representation().IsDouble()) {
2392 DCHECK(instr->elements()->representation().IsTagged()); 2391 DCHECK(instr->elements()->representation().IsTagged());
2393 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp); 2392 return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 LOperand* context = UseFixed(instr->context(), cp); 2811 LOperand* context = UseFixed(instr->context(), cp);
2813 LOperand* function = UseRegisterAtStart(instr->function()); 2812 LOperand* function = UseRegisterAtStart(instr->function());
2814 LAllocateBlockContext* result = 2813 LAllocateBlockContext* result =
2815 new(zone()) LAllocateBlockContext(context, function); 2814 new(zone()) LAllocateBlockContext(context, function);
2816 return MarkAsCall(DefineFixed(result, cp), instr); 2815 return MarkAsCall(DefineFixed(result, cp), instr);
2817 } 2816 }
2818 2817
2819 2818
2820 } // namespace internal 2819 } // namespace internal
2821 } // namespace v8 2820 } // 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