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

Side by Side Diff: src/ic/mips/ic-mips.cc

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: Rebasing Created 4 years, 5 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/ic/mips/handler-compiler-mips.cc ('k') | src/ic/mips/stub-cache-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); 643 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
644 // Never returns to here. 644 // Never returns to here.
645 645
646 __ bind(&maybe_name_key); 646 __ bind(&maybe_name_key);
647 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); 647 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset));
648 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); 648 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset));
649 __ JumpIfNotUniqueNameInstanceType(t0, &slow); 649 __ JumpIfNotUniqueNameInstanceType(t0, &slow);
650 650
651 // The handlers in the stub cache expect a vector and slot. Since we won't 651 // The handlers in the stub cache expect a vector and slot. Since we won't
652 // change the IC from any downstream misses, a dummy vector can be used. 652 // change the IC from any downstream misses, a dummy vector can be used.
653 Register vector = VectorStoreICDescriptor::VectorRegister(); 653 Register vector = StoreWithVectorDescriptor::VectorRegister();
654 Register slot = VectorStoreICDescriptor::SlotRegister(); 654 Register slot = StoreWithVectorDescriptor::SlotRegister();
655 DCHECK(!AreAliased(vector, slot, t1, t2, t4, t5)); 655 DCHECK(!AreAliased(vector, slot, t1, t2, t4, t5));
656 Handle<TypeFeedbackVector> dummy_vector = 656 Handle<TypeFeedbackVector> dummy_vector =
657 TypeFeedbackVector::DummyVector(masm->isolate()); 657 TypeFeedbackVector::DummyVector(masm->isolate());
658 int slot_index = dummy_vector->GetIndex( 658 int slot_index = dummy_vector->GetIndex(
659 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 659 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
660 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 660 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
661 __ li(slot, Operand(Smi::FromInt(slot_index))); 661 __ li(slot, Operand(Smi::FromInt(slot_index)));
662 662
663 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, t1, 663 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, t1,
664 t2, t4, t5); 664 t2, t4, t5);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 receiver_map, elements_map, elements); 705 receiver_map, elements_map, elements);
706 706
707 __ bind(&miss); 707 __ bind(&miss);
708 GenerateMiss(masm); 708 GenerateMiss(masm);
709 } 709 }
710 710
711 711
712 static void StoreIC_PushArgs(MacroAssembler* masm) { 712 static void StoreIC_PushArgs(MacroAssembler* masm) {
713 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 713 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
714 StoreDescriptor::ValueRegister(), 714 StoreDescriptor::ValueRegister(),
715 VectorStoreICDescriptor::SlotRegister(), 715 StoreWithVectorDescriptor::SlotRegister(),
716 VectorStoreICDescriptor::VectorRegister()); 716 StoreWithVectorDescriptor::VectorRegister());
717 } 717 }
718 718
719 719
720 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 720 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
721 StoreIC_PushArgs(masm); 721 StoreIC_PushArgs(masm);
722 722
723 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); 723 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
724 } 724 }
725 725
726 void StoreIC::GenerateMiss(MacroAssembler* masm) { 726 void StoreIC::GenerateMiss(MacroAssembler* masm) {
727 StoreIC_PushArgs(masm); 727 StoreIC_PushArgs(masm);
728 728
729 // Perform tail call to the entry. 729 // Perform tail call to the entry.
730 __ TailCallRuntime(Runtime::kStoreIC_Miss); 730 __ TailCallRuntime(Runtime::kStoreIC_Miss);
731 } 731 }
732 732
733 733
734 void StoreIC::GenerateNormal(MacroAssembler* masm) { 734 void StoreIC::GenerateNormal(MacroAssembler* masm) {
735 Label miss; 735 Label miss;
736 Register receiver = StoreDescriptor::ReceiverRegister(); 736 Register receiver = StoreDescriptor::ReceiverRegister();
737 Register name = StoreDescriptor::NameRegister(); 737 Register name = StoreDescriptor::NameRegister();
738 Register value = StoreDescriptor::ValueRegister(); 738 Register value = StoreDescriptor::ValueRegister();
739 Register dictionary = t1; 739 Register dictionary = t1;
740 DCHECK(receiver.is(a1)); 740 DCHECK(receiver.is(a1));
741 DCHECK(name.is(a2)); 741 DCHECK(name.is(a2));
742 DCHECK(value.is(a0)); 742 DCHECK(value.is(a0));
743 DCHECK(VectorStoreICDescriptor::VectorRegister().is(a3)); 743 DCHECK(StoreWithVectorDescriptor::VectorRegister().is(a3));
744 DCHECK(VectorStoreICDescriptor::SlotRegister().is(t0)); 744 DCHECK(StoreWithVectorDescriptor::SlotRegister().is(t0));
745 745
746 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 746 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
747 747
748 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t2, t5); 748 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t2, t5);
749 Counters* counters = masm->isolate()->counters(); 749 Counters* counters = masm->isolate()->counters();
750 __ IncrementCounter(counters->ic_store_normal_hit(), 1, t2, t5); 750 __ IncrementCounter(counters->ic_store_normal_hit(), 1, t2, t5);
751 __ Ret(); 751 __ Ret();
752 752
753 __ bind(&miss); 753 __ bind(&miss);
754 __ IncrementCounter(counters->ic_store_normal_miss(), 1, t2, t5); 754 __ IncrementCounter(counters->ic_store_normal_miss(), 1, t2, t5);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 break; 879 break;
880 default: 880 default:
881 UNIMPLEMENTED(); 881 UNIMPLEMENTED();
882 } 882 }
883 patcher.ChangeBranchCondition(branch_instr, opcode); 883 patcher.ChangeBranchCondition(branch_instr, opcode);
884 } 884 }
885 } // namespace internal 885 } // namespace internal
886 } // namespace v8 886 } // namespace v8
887 887
888 #endif // V8_TARGET_ARCH_MIPS 888 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698