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

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

Issue 486213003: Move register conventions out of the IC classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.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 "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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 1656 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
1657 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell(); 1657 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell();
1658 return instr->RequiresHoleCheck() 1658 return instr->RequiresHoleCheck()
1659 ? AssignEnvironment(DefineAsRegister(result)) 1659 ? AssignEnvironment(DefineAsRegister(result))
1660 : DefineAsRegister(result); 1660 : DefineAsRegister(result);
1661 } 1661 }
1662 1662
1663 1663
1664 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 1664 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
1665 LOperand* context = UseFixed(instr->context(), cp); 1665 LOperand* context = UseFixed(instr->context(), cp);
1666 LOperand* global_object = UseFixed(instr->global_object(), 1666 LOperand* global_object =
1667 LoadIC::ReceiverRegister()); 1667 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
1668 LOperand* vector = NULL; 1668 LOperand* vector = NULL;
1669 if (FLAG_vector_ics) { 1669 if (FLAG_vector_ics) {
1670 vector = FixedTemp(LoadIC::VectorRegister()); 1670 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
1671 } 1671 }
1672 1672
1673 LLoadGlobalGeneric* result = 1673 LLoadGlobalGeneric* result =
1674 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 1674 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
1675 return MarkAsCall(DefineFixed(result, x0), instr); 1675 return MarkAsCall(DefineFixed(result, x0), instr);
1676 } 1676 }
1677 1677
1678 1678
1679 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 1679 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
1680 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 1680 DCHECK(instr->key()->representation().IsSmiOrInteger32());
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 !instr->CheckFlag(HInstruction::kUint32)) { 1718 !instr->CheckFlag(HInstruction::kUint32)) {
1719 result = AssignEnvironment(result); 1719 result = AssignEnvironment(result);
1720 } 1720 }
1721 return result; 1721 return result;
1722 } 1722 }
1723 } 1723 }
1724 1724
1725 1725
1726 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 1726 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
1727 LOperand* context = UseFixed(instr->context(), cp); 1727 LOperand* context = UseFixed(instr->context(), cp);
1728 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 1728 LOperand* object =
1729 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); 1729 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
1730 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
1730 LOperand* vector = NULL; 1731 LOperand* vector = NULL;
1731 if (FLAG_vector_ics) { 1732 if (FLAG_vector_ics) {
1732 vector = FixedTemp(LoadIC::VectorRegister()); 1733 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
1733 } 1734 }
1734 1735
1735 LInstruction* result = 1736 LInstruction* result =
1736 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 1737 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
1737 x0); 1738 x0);
1738 return MarkAsCall(result, instr); 1739 return MarkAsCall(result, instr);
1739 } 1740 }
1740 1741
1741 1742
1742 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1743 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1743 LOperand* object = UseRegisterAtStart(instr->object()); 1744 LOperand* object = UseRegisterAtStart(instr->object());
1744 return DefineAsRegister(new(zone()) LLoadNamedField(object)); 1745 return DefineAsRegister(new(zone()) LLoadNamedField(object));
1745 } 1746 }
1746 1747
1747 1748
1748 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 1749 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
1749 LOperand* context = UseFixed(instr->context(), cp); 1750 LOperand* context = UseFixed(instr->context(), cp);
1750 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 1751 LOperand* object =
1752 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
1751 LOperand* vector = NULL; 1753 LOperand* vector = NULL;
1752 if (FLAG_vector_ics) { 1754 if (FLAG_vector_ics) {
1753 vector = FixedTemp(LoadIC::VectorRegister()); 1755 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
1754 } 1756 }
1755 1757
1756 LInstruction* result = 1758 LInstruction* result =
1757 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), x0); 1759 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), x0);
1758 return MarkAsCall(result, instr); 1760 return MarkAsCall(result, instr);
1759 } 1761 }
1760 1762
1761 1763
1762 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { 1764 LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) {
1763 return DefineAsRegister(new(zone()) LLoadRoot); 1765 return DefineAsRegister(new(zone()) LLoadRoot);
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 DCHECK(instr->elements()->representation().IsTagged()); 2361 DCHECK(instr->elements()->representation().IsTagged());
2360 DCHECK(instr->value()->representation().IsSmiOrTagged() || 2362 DCHECK(instr->value()->representation().IsSmiOrTagged() ||
2361 instr->value()->representation().IsInteger32()); 2363 instr->value()->representation().IsInteger32());
2362 return new(zone()) LStoreKeyedFixed(elements, key, val, temp); 2364 return new(zone()) LStoreKeyedFixed(elements, key, val, temp);
2363 } 2365 }
2364 } 2366 }
2365 2367
2366 2368
2367 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2369 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2368 LOperand* context = UseFixed(instr->context(), cp); 2370 LOperand* context = UseFixed(instr->context(), cp);
2369 LOperand* object = UseFixed(instr->object(), 2371 LOperand* object =
2370 KeyedStoreIC::ReceiverRegister()); 2372 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2371 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); 2373 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
2372 LOperand* value = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); 2374 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2373 2375
2374 DCHECK(instr->object()->representation().IsTagged()); 2376 DCHECK(instr->object()->representation().IsTagged());
2375 DCHECK(instr->key()->representation().IsTagged()); 2377 DCHECK(instr->key()->representation().IsTagged());
2376 DCHECK(instr->value()->representation().IsTagged()); 2378 DCHECK(instr->value()->representation().IsTagged());
2377 2379
2378 return MarkAsCall( 2380 return MarkAsCall(
2379 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr); 2381 new(zone()) LStoreKeyedGeneric(context, object, key, value), instr);
2380 } 2382 }
2381 2383
2382 2384
(...skipping 21 matching lines...) Expand all
2404 value = UseRegister(instr->value()); 2406 value = UseRegister(instr->value());
2405 temp0 = TempRegister(); 2407 temp0 = TempRegister();
2406 } 2408 }
2407 2409
2408 return new(zone()) LStoreNamedField(object, value, temp0, temp1); 2410 return new(zone()) LStoreNamedField(object, value, temp0, temp1);
2409 } 2411 }
2410 2412
2411 2413
2412 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2414 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2413 LOperand* context = UseFixed(instr->context(), cp); 2415 LOperand* context = UseFixed(instr->context(), cp);
2414 LOperand* object = UseFixed(instr->object(), StoreIC::ReceiverRegister()); 2416 LOperand* object =
2415 LOperand* value = UseFixed(instr->value(), StoreIC::ValueRegister()); 2417 UseFixed(instr->object(), StoreConvention::ReceiverRegister());
2418 LOperand* value = UseFixed(instr->value(), StoreConvention::ValueRegister());
2416 2419
2417 LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value); 2420 LInstruction* result = new(zone()) LStoreNamedGeneric(context, object, value);
2418 return MarkAsCall(result, instr); 2421 return MarkAsCall(result, instr);
2419 } 2422 }
2420 2423
2421 2424
2422 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2425 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2423 LOperand* context = UseFixed(instr->context(), cp); 2426 LOperand* context = UseFixed(instr->context(), cp);
2424 LOperand* left = UseFixed(instr->left(), x1); 2427 LOperand* left = UseFixed(instr->left(), x1);
2425 LOperand* right = UseFixed(instr->right(), x0); 2428 LOperand* right = UseFixed(instr->right(), x0);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 HAllocateBlockContext* instr) { 2736 HAllocateBlockContext* instr) {
2734 LOperand* context = UseFixed(instr->context(), cp); 2737 LOperand* context = UseFixed(instr->context(), cp);
2735 LOperand* function = UseRegisterAtStart(instr->function()); 2738 LOperand* function = UseRegisterAtStart(instr->function());
2736 LAllocateBlockContext* result = 2739 LAllocateBlockContext* result =
2737 new(zone()) LAllocateBlockContext(context, function); 2740 new(zone()) LAllocateBlockContext(context, function);
2738 return MarkAsCall(DefineFixed(result, cp), instr); 2741 return MarkAsCall(DefineFixed(result, cp), instr);
2739 } 2742 }
2740 2743
2741 2744
2742 } } // namespace v8::internal 2745 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698