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

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

Issue 1846963002: Use a dictionary-mode code cache on the map rather than a dual system. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 8 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 Register vector = LoadWithVectorDescriptor::VectorRegister(); 418 Register vector = LoadWithVectorDescriptor::VectorRegister();
419 Register slot = LoadWithVectorDescriptor::SlotRegister(); 419 Register slot = LoadWithVectorDescriptor::SlotRegister();
420 DCHECK(!AreAliased(vector, slot, r7, r8, r9, r10)); 420 DCHECK(!AreAliased(vector, slot, r7, r8, r9, r10));
421 Handle<TypeFeedbackVector> dummy_vector = 421 Handle<TypeFeedbackVector> dummy_vector =
422 TypeFeedbackVector::DummyVector(masm->isolate()); 422 TypeFeedbackVector::DummyVector(masm->isolate());
423 int slot_index = dummy_vector->GetIndex( 423 int slot_index = dummy_vector->GetIndex(
424 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); 424 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
425 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 425 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
426 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); 426 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index));
427 427
428 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 428 Code::Flags flags =
429 Code::ComputeHandlerFlags(Code::LOAD_IC)); 429 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC));
430 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, 430 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags,
431 receiver, key, r7, r8, r9, r10); 431 receiver, key, r7, r8, r9, r10);
432 // Cache miss. 432 // Cache miss.
433 GenerateMiss(masm); 433 GenerateMiss(masm);
434 434
435 // Do a quick inline probe of the receiver's dictionary, if it 435 // Do a quick inline probe of the receiver's dictionary, if it
436 // exists. 436 // exists.
437 __ bind(&probe_dictionary); 437 __ bind(&probe_dictionary);
438 // r6: elements 438 // r6: elements
439 __ LoadP(r3, FieldMemOperand(receiver, HeapObject::kMapOffset)); 439 __ LoadP(r3, FieldMemOperand(receiver, HeapObject::kMapOffset));
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 Register vector = VectorStoreICDescriptor::VectorRegister(); 679 Register vector = VectorStoreICDescriptor::VectorRegister();
680 Register slot = VectorStoreICDescriptor::SlotRegister(); 680 Register slot = VectorStoreICDescriptor::SlotRegister();
681 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11)); 681 DCHECK(!AreAliased(vector, slot, r8, r9, r10, r11));
682 Handle<TypeFeedbackVector> dummy_vector = 682 Handle<TypeFeedbackVector> dummy_vector =
683 TypeFeedbackVector::DummyVector(masm->isolate()); 683 TypeFeedbackVector::DummyVector(masm->isolate());
684 int slot_index = dummy_vector->GetIndex( 684 int slot_index = dummy_vector->GetIndex(
685 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 685 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
686 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 686 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
687 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); 687 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index));
688 688
689 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 689 Code::Flags flags =
690 Code::ComputeHandlerFlags(Code::STORE_IC)); 690 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC));
691 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 691 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
692 receiver, key, r8, r9, r10, r11); 692 receiver, key, r8, r9, r10, r11);
693 // Cache miss. 693 // Cache miss.
694 __ b(&miss); 694 __ b(&miss);
695 695
696 // Extra capacity case: Check if there is extra capacity to 696 // Extra capacity case: Check if there is extra capacity to
697 // perform the store and update the length. Used for adding one 697 // perform the store and update the length. Used for adding one
698 // element to the array by writing to array[array.length]. 698 // element to the array by writing to array[array.length].
699 __ bind(&extra); 699 __ bind(&extra);
700 // Condition code from comparing key and array length is still available. 700 // Condition code from comparing key and array length is still available.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 741
742 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 742 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
743 Register receiver = StoreDescriptor::ReceiverRegister(); 743 Register receiver = StoreDescriptor::ReceiverRegister();
744 Register name = StoreDescriptor::NameRegister(); 744 Register name = StoreDescriptor::NameRegister();
745 DCHECK(receiver.is(r4)); 745 DCHECK(receiver.is(r4));
746 DCHECK(name.is(r5)); 746 DCHECK(name.is(r5));
747 DCHECK(StoreDescriptor::ValueRegister().is(r3)); 747 DCHECK(StoreDescriptor::ValueRegister().is(r3));
748 748
749 // Get the receiver from the stack and probe the stub cache. 749 // Get the receiver from the stack and probe the stub cache.
750 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 750 Code::Flags flags =
751 Code::ComputeHandlerFlags(Code::STORE_IC)); 751 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC));
752 752
753 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 753 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
754 receiver, name, r6, r7, r8, r9); 754 receiver, name, r6, r7, r8, r9);
755 755
756 // Cache miss: Jump to runtime. 756 // Cache miss: Jump to runtime.
757 GenerateMiss(masm); 757 GenerateMiss(masm);
758 } 758 }
759 759
760 760
761 void StoreIC::GenerateMiss(MacroAssembler* masm) { 761 void StoreIC::GenerateMiss(MacroAssembler* masm) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 patcher.EmitCondition(ne); 887 patcher.EmitCondition(ne);
888 } else { 888 } else {
889 DCHECK(Assembler::GetCondition(branch_instr) == ne); 889 DCHECK(Assembler::GetCondition(branch_instr) == ne);
890 patcher.EmitCondition(eq); 890 patcher.EmitCondition(eq);
891 } 891 }
892 } 892 }
893 } // namespace internal 893 } // namespace internal
894 } // namespace v8 894 } // namespace v8
895 895
896 #endif // V8_TARGET_ARCH_PPC 896 #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