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

Side by Side Diff: src/ic/arm64/ic-arm64.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/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/stub-cache-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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 Register vector = LoadWithVectorDescriptor::VectorRegister(); 387 Register vector = LoadWithVectorDescriptor::VectorRegister();
388 Register slot = LoadWithVectorDescriptor::SlotRegister(); 388 Register slot = LoadWithVectorDescriptor::SlotRegister();
389 DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4)); 389 DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4));
390 Handle<TypeFeedbackVector> dummy_vector = 390 Handle<TypeFeedbackVector> dummy_vector =
391 TypeFeedbackVector::DummyVector(masm->isolate()); 391 TypeFeedbackVector::DummyVector(masm->isolate());
392 int slot_index = dummy_vector->GetIndex( 392 int slot_index = dummy_vector->GetIndex(
393 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); 393 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
394 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 394 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
395 __ Mov(slot, Operand(Smi::FromInt(slot_index))); 395 __ Mov(slot, Operand(Smi::FromInt(slot_index)));
396 396
397 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 397 Code::Flags flags =
398 Code::ComputeHandlerFlags(Code::LOAD_IC)); 398 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC));
399 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, 399 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags,
400 receiver, key, scratch1, 400 receiver, key, scratch1,
401 scratch2, scratch3, scratch4); 401 scratch2, scratch3, scratch4);
402 // Cache miss. 402 // Cache miss.
403 KeyedLoadIC::GenerateMiss(masm); 403 KeyedLoadIC::GenerateMiss(masm);
404 404
405 // Do a quick inline probe of the receiver's dictionary, if it exists. 405 // Do a quick inline probe of the receiver's dictionary, if it exists.
406 __ Bind(&probe_dictionary); 406 __ Bind(&probe_dictionary);
407 __ Ldr(scratch1, FieldMemOperand(receiver, HeapObject::kMapOffset)); 407 __ Ldr(scratch1, FieldMemOperand(receiver, HeapObject::kMapOffset));
408 __ Ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset)); 408 __ Ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 Register vector = VectorStoreICDescriptor::VectorRegister(); 666 Register vector = VectorStoreICDescriptor::VectorRegister();
667 Register slot = VectorStoreICDescriptor::SlotRegister(); 667 Register slot = VectorStoreICDescriptor::SlotRegister();
668 DCHECK(!AreAliased(vector, slot, x5, x6, x7, x8)); 668 DCHECK(!AreAliased(vector, slot, x5, x6, x7, x8));
669 Handle<TypeFeedbackVector> dummy_vector = 669 Handle<TypeFeedbackVector> dummy_vector =
670 TypeFeedbackVector::DummyVector(masm->isolate()); 670 TypeFeedbackVector::DummyVector(masm->isolate());
671 int slot_index = dummy_vector->GetIndex( 671 int slot_index = dummy_vector->GetIndex(
672 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 672 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
673 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 673 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
674 __ Mov(slot, Operand(Smi::FromInt(slot_index))); 674 __ Mov(slot, Operand(Smi::FromInt(slot_index)));
675 675
676 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 676 Code::Flags flags =
677 Code::ComputeHandlerFlags(Code::STORE_IC)); 677 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC));
678 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 678 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
679 receiver, key, x5, x6, x7, x8); 679 receiver, key, x5, x6, x7, x8);
680 // Cache miss. 680 // Cache miss.
681 __ B(&miss); 681 __ B(&miss);
682 682
683 __ Bind(&extra); 683 __ Bind(&extra);
684 // Extra capacity case: Check if there is extra capacity to 684 // Extra capacity case: Check if there is extra capacity to
685 // perform the store and update the length. Used for adding one 685 // perform the store and update the length. Used for adding one
686 // element to the array by writing to array[array.length]. 686 // element to the array by writing to array[array.length].
687 687
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 727
728 728
729 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 729 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
730 Register receiver = StoreDescriptor::ReceiverRegister(); 730 Register receiver = StoreDescriptor::ReceiverRegister();
731 Register name = StoreDescriptor::NameRegister(); 731 Register name = StoreDescriptor::NameRegister();
732 DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4, 732 DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4,
733 x5, x6)); 733 x5, x6));
734 734
735 // Probe the stub cache. 735 // Probe the stub cache.
736 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 736 Code::Flags flags =
737 Code::ComputeHandlerFlags(Code::STORE_IC)); 737 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC));
738 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 738 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
739 receiver, name, x3, x4, x5, x6); 739 receiver, name, x3, x4, x5, x6);
740 740
741 // Cache miss: Jump to runtime. 741 // Cache miss: Jump to runtime.
742 GenerateMiss(masm); 742 GenerateMiss(masm);
743 } 743 }
744 744
745 745
746 void StoreIC::GenerateMiss(MacroAssembler* masm) { 746 void StoreIC::GenerateMiss(MacroAssembler* masm) {
747 StoreIC_PushArgs(masm); 747 StoreIC_PushArgs(masm);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 } else { 858 } else {
859 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 859 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
860 // This is JumpIfSmi(smi_reg, branch_imm). 860 // This is JumpIfSmi(smi_reg, branch_imm).
861 patcher.tbz(smi_reg, 0, branch_imm); 861 patcher.tbz(smi_reg, 0, branch_imm);
862 } 862 }
863 } 863 }
864 } // namespace internal 864 } // namespace internal
865 } // namespace v8 865 } // namespace v8
866 866
867 #endif // V8_TARGET_ARCH_ARM64 867 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698