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

Side by Side Diff: src/ic/x64/ic-x64.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/ic/mips64/ic-mips64.cc ('k') | src/mips/builtins-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset), 338 __ CompareRoot(FieldOperand(rbx, HeapObject::kMapOffset),
339 Heap::kHashTableMapRootIndex); 339 Heap::kHashTableMapRootIndex);
340 __ j(equal, &probe_dictionary); 340 __ j(equal, &probe_dictionary);
341 341
342 Register megamorphic_scratch = rdi; 342 Register megamorphic_scratch = rdi;
343 // The handlers in the stub cache expect a vector and slot. Since we won't 343 // The handlers in the stub cache expect a vector and slot. Since we won't
344 // change the IC from any downstream misses, a dummy vector can be used. 344 // change the IC from any downstream misses, a dummy vector can be used.
345 Register vector = LoadWithVectorDescriptor::VectorRegister(); 345 Register vector = LoadWithVectorDescriptor::VectorRegister();
346 Register slot = LoadDescriptor::SlotRegister(); 346 Register slot = LoadDescriptor::SlotRegister();
347 DCHECK(!AreAliased(megamorphic_scratch, vector, slot)); 347 DCHECK(!AreAliased(megamorphic_scratch, vector, slot));
348 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 348 Handle<TypeFeedbackVector> dummy_vector =
349 masm->isolate()->factory()->keyed_load_dummy_vector()); 349 TypeFeedbackVector::DummyVector(masm->isolate());
350 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 350 int slot_index = dummy_vector->GetIndex(
351 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
351 __ Move(vector, dummy_vector); 352 __ Move(vector, dummy_vector);
352 __ Move(slot, Smi::FromInt(slot_index)); 353 __ Move(slot, Smi::FromInt(slot_index));
353 354
354 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 355 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
355 Code::ComputeHandlerFlags(Code::LOAD_IC)); 356 Code::ComputeHandlerFlags(Code::LOAD_IC));
356 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, 357 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags,
357 false, receiver, key, 358 false, receiver, key,
358 megamorphic_scratch, no_reg); 359 megamorphic_scratch, no_reg);
359 // Cache miss. 360 // Cache miss.
360 GenerateMiss(masm); 361 GenerateMiss(masm);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 __ bind(&maybe_name_key); 566 __ bind(&maybe_name_key);
566 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset)); 567 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset));
567 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset)); 568 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset));
568 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index); 569 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index);
569 570
570 if (FLAG_vector_stores) { 571 if (FLAG_vector_stores) {
571 Register vector = VectorStoreICDescriptor::VectorRegister(); 572 Register vector = VectorStoreICDescriptor::VectorRegister();
572 Register slot = VectorStoreICDescriptor::SlotRegister(); 573 Register slot = VectorStoreICDescriptor::SlotRegister();
573 // The handlers in the stub cache expect a vector and slot. Since we won't 574 // The handlers in the stub cache expect a vector and slot. Since we won't
574 // change the IC from any downstream misses, a dummy vector can be used. 575 // change the IC from any downstream misses, a dummy vector can be used.
575 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 576 Handle<TypeFeedbackVector> dummy_vector =
576 masm->isolate()->factory()->keyed_store_dummy_vector()); 577 TypeFeedbackVector::DummyVector(masm->isolate());
577 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 578 int slot_index = dummy_vector->GetIndex(
579 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
578 __ Move(vector, dummy_vector); 580 __ Move(vector, dummy_vector);
579 __ Move(slot, Smi::FromInt(slot_index)); 581 __ Move(slot, Smi::FromInt(slot_index));
580 } 582 }
581 583
582 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 584 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
583 Code::ComputeHandlerFlags(Code::STORE_IC)); 585 Code::ComputeHandlerFlags(Code::STORE_IC));
584 masm->isolate()->stub_cache()->GenerateProbe( 586 masm->isolate()->stub_cache()->GenerateProbe(
585 masm, Code::STORE_IC, flags, false, receiver, key, rbx, no_reg); 587 masm, Code::STORE_IC, flags, false, receiver, key, rbx, no_reg);
586 // Cache miss. 588 // Cache miss.
587 __ jmp(&miss); 589 __ jmp(&miss);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 Condition cc = 880 Condition cc =
879 (check == ENABLE_INLINED_SMI_CHECK) 881 (check == ENABLE_INLINED_SMI_CHECK)
880 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 882 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
881 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 883 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
882 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 884 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
883 } 885 }
884 } // namespace internal 886 } // namespace internal
885 } // namespace v8 887 } // namespace v8
886 888
887 #endif // V8_TARGET_ARCH_X64 889 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698