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

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

Issue 1180713007: Built-in apply() performance benefits from an uninitialized IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. 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 | « src/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index 4fa405d55f4ec8c9bb066844448ee37d424ede9e..2d4421d7e12d811ab0730a6be325ffc671282bb8 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -1105,6 +1105,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;
@@ -1114,7 +1116,13 @@ static void Generate_PushAppliedArguments(MacroAssembler* masm,
__ movp(receiver, Operand(rbp, 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));
+ __ Move(slot, Smi::FromInt(index));
+ __ Move(vector, 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 | « src/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698