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

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

Issue 1268783004: VectorICs: refactoring to eliminate "for queries only" vector ic mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation error. Created 5 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
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ic/arm64/ic-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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 __ ldr(r4, FieldMemOperand(r3, HeapObject::kMapOffset)); 424 __ ldr(r4, FieldMemOperand(r3, HeapObject::kMapOffset));
425 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 425 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
426 __ cmp(r4, ip); 426 __ cmp(r4, ip);
427 __ b(eq, &probe_dictionary); 427 __ b(eq, &probe_dictionary);
428 428
429 // The handlers in the stub cache expect a vector and slot. Since we won't 429 // The handlers in the stub cache expect a vector and slot. Since we won't
430 // change the IC from any downstream misses, a dummy vector can be used. 430 // change the IC from any downstream misses, a dummy vector can be used.
431 Register vector = LoadWithVectorDescriptor::VectorRegister(); 431 Register vector = LoadWithVectorDescriptor::VectorRegister();
432 Register slot = LoadWithVectorDescriptor::SlotRegister(); 432 Register slot = LoadWithVectorDescriptor::SlotRegister();
433 DCHECK(!AreAliased(vector, slot, r4, r5, r6, r9)); 433 DCHECK(!AreAliased(vector, slot, r4, r5, r6, r9));
434 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 434 Handle<TypeFeedbackVector> dummy_vector =
435 masm->isolate()->factory()->keyed_load_dummy_vector()); 435 TypeFeedbackVector::DummyVector(masm->isolate());
436 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 436 int slot_index = dummy_vector->GetIndex(
437 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); 437 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
438 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
438 __ mov(slot, Operand(Smi::FromInt(slot_index))); 439 __ mov(slot, Operand(Smi::FromInt(slot_index)));
439 440
440 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 441 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
441 Code::ComputeHandlerFlags(Code::LOAD_IC)); 442 Code::ComputeHandlerFlags(Code::LOAD_IC));
442 masm->isolate()->stub_cache()->GenerateProbe( 443 masm->isolate()->stub_cache()->GenerateProbe(
443 masm, Code::KEYED_LOAD_IC, flags, false, receiver, key, r4, r5, r6, r9); 444 masm, Code::KEYED_LOAD_IC, flags, false, receiver, key, r4, r5, r6, r9);
444 // Cache miss. 445 // Cache miss.
445 GenerateMiss(masm); 446 GenerateMiss(masm);
446 447
447 // Do a quick inline probe of the receiver's dictionary, if it 448 // Do a quick inline probe of the receiver's dictionary, if it
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset)); 693 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset));
693 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset)); 694 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset));
694 __ JumpIfNotUniqueNameInstanceType(r4, &slow); 695 __ JumpIfNotUniqueNameInstanceType(r4, &slow);
695 696
696 if (FLAG_vector_stores) { 697 if (FLAG_vector_stores) {
697 // The handlers in the stub cache expect a vector and slot. Since we won't 698 // The handlers in the stub cache expect a vector and slot. Since we won't
698 // change the IC from any downstream misses, a dummy vector can be used. 699 // change the IC from any downstream misses, a dummy vector can be used.
699 Register vector = VectorStoreICDescriptor::VectorRegister(); 700 Register vector = VectorStoreICDescriptor::VectorRegister();
700 Register slot = VectorStoreICDescriptor::SlotRegister(); 701 Register slot = VectorStoreICDescriptor::SlotRegister();
701 DCHECK(!AreAliased(vector, slot, r3, r4, r5, r6)); 702 DCHECK(!AreAliased(vector, slot, r3, r4, r5, r6));
702 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 703 Handle<TypeFeedbackVector> dummy_vector =
703 masm->isolate()->factory()->keyed_store_dummy_vector()); 704 TypeFeedbackVector::DummyVector(masm->isolate());
704 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 705 int slot_index = dummy_vector->GetIndex(
705 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); 706 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
707 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
706 __ mov(slot, Operand(Smi::FromInt(slot_index))); 708 __ mov(slot, Operand(Smi::FromInt(slot_index)));
707 } 709 }
708 710
709 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 711 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
710 Code::ComputeHandlerFlags(Code::STORE_IC)); 712 Code::ComputeHandlerFlags(Code::STORE_IC));
711 masm->isolate()->stub_cache()->GenerateProbe( 713 masm->isolate()->stub_cache()->GenerateProbe(
712 masm, Code::STORE_IC, flags, false, receiver, key, r3, r4, r5, r6); 714 masm, Code::STORE_IC, flags, false, receiver, key, r3, r4, r5, r6);
713 // Cache miss. 715 // Cache miss.
714 __ b(&miss); 716 __ b(&miss);
715 717
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 patcher.EmitCondition(ne); 903 patcher.EmitCondition(ne);
902 } else { 904 } else {
903 DCHECK(Assembler::GetCondition(branch_instr) == ne); 905 DCHECK(Assembler::GetCondition(branch_instr) == ne);
904 patcher.EmitCondition(eq); 906 patcher.EmitCondition(eq);
905 } 907 }
906 } 908 }
907 } // namespace internal 909 } // namespace internal
908 } // namespace v8 910 } // namespace v8
909 911
910 #endif // V8_TARGET_ARCH_ARM 912 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ic/arm64/ic-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698