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

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

Issue 1199913007: X87: 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/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index 2fa599b6d050e68c909190b1bdd0b230b2f80374..311290ff2f96a7e10f266458fbb6b696b324d942 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -1052,13 +1052,21 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
Label entry, loop;
Register receiver = LoadDescriptor::ReceiverRegister();
Register key = LoadDescriptor::NameRegister();
+ Register slot = LoadDescriptor::SlotRegister();
+ Register vector = LoadWithVectorDescriptor::VectorRegister();
__ mov(key, Operand(ebp, indexOffset));
__ jmp(&entry);
__ bind(&loop);
__ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments
// 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));
+ __ mov(slot, Immediate(Smi::FromInt(index)));
+ __ mov(vector, Immediate(feedback_vector));
+ Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
__ call(ic, RelocInfo::CODE_TARGET);
// It is important that we do not have a test instruction after the
// call. A test instruction after the call is used to indicate that
« 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