PPC: VectorICs: refactoring to eliminate "for queries only" vector ic mode.
Port 1a5751f9b3
Original commit message:
Since we need the notion of a dummy vector ic, we can use that to avoid
a special case of the IC constructor. Also, consolidate the two dummy
ICs into one.
R=mvstanton@chromium.org, michael_dawson@ca.ibm.com, jyan@ca.ibm.com, joransiu@ca.ibm.com
BUG=
Review URL: https://codereview.chromium.org/1261433007
Cr-Commit-Position: refs/heads/master@{#29959}
This commit is contained in:
parent
ffb3a92759
commit
de7e8a8c6d
@ -441,10 +441,11 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
|
||||
Register vector = LoadWithVectorDescriptor::VectorRegister();
|
||||
Register slot = LoadWithVectorDescriptor::SlotRegister();
|
||||
DCHECK(!AreAliased(vector, slot, r7, r8, r9, r10));
|
||||
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
|
||||
masm->isolate()->factory()->keyed_load_dummy_vector());
|
||||
int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
|
||||
__ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex);
|
||||
Handle<TypeFeedbackVector> dummy_vector =
|
||||
TypeFeedbackVector::DummyVector(masm->isolate());
|
||||
int slot_index = dummy_vector->GetIndex(
|
||||
FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot));
|
||||
__ LoadRoot(vector, Heap::kDummyVectorRootIndex);
|
||||
__ LoadSmiLiteral(slot, Smi::FromInt(slot_index));
|
||||
|
||||
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
||||
@ -713,10 +714,11 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
|
||||
Register vector = VectorStoreICDescriptor::VectorRegister();
|
||||
Register slot = VectorStoreICDescriptor::SlotRegister();
|
||||
DCHECK(!AreAliased(vector, slot, r6, r7, r8, r9));
|
||||
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
|
||||
masm->isolate()->factory()->keyed_store_dummy_vector());
|
||||
int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
|
||||
__ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex);
|
||||
Handle<TypeFeedbackVector> dummy_vector =
|
||||
TypeFeedbackVector::DummyVector(masm->isolate());
|
||||
int slot_index = dummy_vector->GetIndex(
|
||||
FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
|
||||
__ LoadRoot(vector, Heap::kDummyVectorRootIndex);
|
||||
__ LoadSmiLiteral(slot, Smi::FromInt(slot_index));
|
||||
}
|
||||
|
||||
|
@ -1478,7 +1478,8 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
|
||||
__ LoadP(receiver, MemOperand(fp, argumentsOffset));
|
||||
|
||||
// Use inline caching to speed up access to arguments.
|
||||
FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
|
||||
Code::Kind kinds[] = {Code::KEYED_LOAD_IC};
|
||||
FeedbackVectorSpec spec(0, 1, kinds);
|
||||
Handle<TypeFeedbackVector> feedback_vector =
|
||||
masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
|
||||
int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
|
||||
|
Loading…
Reference in New Issue
Block a user