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

Unified Diff: src/ppc/builtins-ppc.cc

Issue 1196253003: PPC: Built-in apply() performance benefits from an uninitialized IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/builtins-ppc.cc
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc
index 5935896205dc11cafc655f2bbdf9f56c2bda38a9..1bfda37468ec9714274880db7b511c6078dc2b1e 100644
--- a/src/ppc/builtins-ppc.cc
+++ b/src/ppc/builtins-ppc.cc
@@ -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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698