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

Side by Side Diff: src/ic/ppc/ic-ppc.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/ppc/handler-compiler-ppc.cc ('k') | src/ic/ppc/stub-cache-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 __ bind(&index_name); 446 __ bind(&index_name);
447 __ IndexFromHash(r6, key); 447 __ IndexFromHash(r6, key);
448 // Now jump to the place where smi keys are handled. 448 // Now jump to the place where smi keys are handled.
449 __ b(&index_smi); 449 __ b(&index_smi);
450 } 450 }
451 451
452 452
453 static void StoreIC_PushArgs(MacroAssembler* masm) { 453 static void StoreIC_PushArgs(MacroAssembler* masm) {
454 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 454 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
455 StoreDescriptor::ValueRegister(), 455 StoreDescriptor::ValueRegister(),
456 VectorStoreICDescriptor::SlotRegister(), 456 StoreWithVectorDescriptor::SlotRegister(),
457 VectorStoreICDescriptor::VectorRegister()); 457 StoreWithVectorDescriptor::VectorRegister());
458 } 458 }
459 459
460 460
461 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 461 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
462 StoreIC_PushArgs(masm); 462 StoreIC_PushArgs(masm);
463 463
464 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); 464 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss);
465 } 465 }
466 466
467 467
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); 666 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
667 // Never returns to here. 667 // Never returns to here.
668 668
669 __ bind(&maybe_name_key); 669 __ bind(&maybe_name_key);
670 __ LoadP(r7, FieldMemOperand(key, HeapObject::kMapOffset)); 670 __ LoadP(r7, FieldMemOperand(key, HeapObject::kMapOffset));
671 __ lbz(r7, FieldMemOperand(r7, Map::kInstanceTypeOffset)); 671 __ lbz(r7, FieldMemOperand(r7, Map::kInstanceTypeOffset));
672 __ JumpIfNotUniqueNameInstanceType(r7, &slow); 672 __ JumpIfNotUniqueNameInstanceType(r7, &slow);
673 673
674 // The handlers in the stub cache expect a vector and slot. Since we won't 674 // The handlers in the stub cache expect a vector and slot. Since we won't
675 // change the IC from any downstream misses, a dummy vector can be used. 675 // change the IC from any downstream misses, a dummy vector can be used.
676 Register vector = VectorStoreICDescriptor::VectorRegister(); 676 Register vector = StoreWithVectorDescriptor::VectorRegister();
677 Register slot = VectorStoreICDescriptor::SlotRegister(); 677 Register slot = StoreWithVectorDescriptor::SlotRegister();
678 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11)); 678 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11));
679 Handle<TypeFeedbackVector> dummy_vector = 679 Handle<TypeFeedbackVector> dummy_vector =
680 TypeFeedbackVector::DummyVector(masm->isolate()); 680 TypeFeedbackVector::DummyVector(masm->isolate());
681 int slot_index = dummy_vector->GetIndex( 681 int slot_index = dummy_vector->GetIndex(
682 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 682 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
683 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 683 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
684 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); 684 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index));
685 685
686 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r8, 686 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r8,
687 r9, r10, r11); 687 r9, r10, r11);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 void StoreIC::GenerateNormal(MacroAssembler* masm) { 744 void StoreIC::GenerateNormal(MacroAssembler* masm) {
745 Label miss; 745 Label miss;
746 Register receiver = StoreDescriptor::ReceiverRegister(); 746 Register receiver = StoreDescriptor::ReceiverRegister();
747 Register name = StoreDescriptor::NameRegister(); 747 Register name = StoreDescriptor::NameRegister();
748 Register value = StoreDescriptor::ValueRegister(); 748 Register value = StoreDescriptor::ValueRegister();
749 Register dictionary = r8; 749 Register dictionary = r8;
750 DCHECK(receiver.is(r4)); 750 DCHECK(receiver.is(r4));
751 DCHECK(name.is(r5)); 751 DCHECK(name.is(r5));
752 DCHECK(value.is(r3)); 752 DCHECK(value.is(r3));
753 DCHECK(VectorStoreICDescriptor::VectorRegister().is(r6)); 753 DCHECK(StoreWithVectorDescriptor::VectorRegister().is(r6));
754 DCHECK(VectorStoreICDescriptor::SlotRegister().is(r7)); 754 DCHECK(StoreWithVectorDescriptor::SlotRegister().is(r7));
755 755
756 __ LoadP(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 756 __ LoadP(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
757 757
758 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r9, r10); 758 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r9, r10);
759 Counters* counters = masm->isolate()->counters(); 759 Counters* counters = masm->isolate()->counters();
760 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r9, r10); 760 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r9, r10);
761 __ Ret(); 761 __ Ret();
762 762
763 __ bind(&miss); 763 __ bind(&miss);
764 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r9, r10); 764 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r9, r10);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 patcher.EmitCondition(ne); 863 patcher.EmitCondition(ne);
864 } else { 864 } else {
865 DCHECK(Assembler::GetCondition(branch_instr) == ne); 865 DCHECK(Assembler::GetCondition(branch_instr) == ne);
866 patcher.EmitCondition(eq); 866 patcher.EmitCondition(eq);
867 } 867 }
868 } 868 }
869 } // namespace internal 869 } // namespace internal
870 } // namespace v8 870 } // namespace v8
871 871
872 #endif // V8_TARGET_ARCH_PPC 872 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ic/ppc/stub-cache-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698