PPC: Built-in apply() performance benefits from an uninitialized IC.

Port 2a3b057587

R=mvstanton@chromium.org, dstence@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1196253003

Cr-Commit-Position: refs/heads/master@{#29196}
This commit is contained in:
mbrandy 2015-06-22 11:15:25 -07:00 committed by Commit bot
parent 001ee86e32
commit 40ec8e1db0

View File

@ -1427,6 +1427,8 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
const int limitOffset) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
Register slot = LoadDescriptor::SlotRegister();
Register vector = LoadWithVectorDescriptor::VectorRegister();
// Copy all arguments from the array to the stack.
Label entry, loop;
@ -1436,7 +1438,13 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
__ LoadP(receiver, MemOperand(fp, argumentsOffset));
// Use inline caching to speed up access to arguments.
Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic();
FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
Handle<TypeFeedbackVector> feedback_vector =
masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
__ LoadSmiLiteral(slot, Smi::FromInt(index));
__ Move(vector, feedback_vector);
Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
__ Call(ic, RelocInfo::CODE_TARGET);
// Push the nth argument.