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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION, NullCallWrapper()); 1098 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION, NullCallWrapper());
1099 } 1099 }
1100 1100
1101 1101
1102 static void Generate_PushAppliedArguments(MacroAssembler* masm, 1102 static void Generate_PushAppliedArguments(MacroAssembler* masm,
1103 const int argumentsOffset, 1103 const int argumentsOffset,
1104 const int indexOffset, 1104 const int indexOffset,
1105 const int limitOffset) { 1105 const int limitOffset) {
1106 Register receiver = LoadDescriptor::ReceiverRegister(); 1106 Register receiver = LoadDescriptor::ReceiverRegister();
1107 Register key = LoadDescriptor::NameRegister(); 1107 Register key = LoadDescriptor::NameRegister();
1108 Register slot = LoadDescriptor::SlotRegister();
1109 Register vector = LoadWithVectorDescriptor::VectorRegister();
1108 1110
1109 // Copy all arguments from the array to the stack. 1111 // Copy all arguments from the array to the stack.
1110 Label entry, loop; 1112 Label entry, loop;
1111 __ movp(key, Operand(rbp, indexOffset)); 1113 __ movp(key, Operand(rbp, indexOffset));
1112 __ jmp(&entry); 1114 __ jmp(&entry);
1113 __ bind(&loop); 1115 __ bind(&loop);
1114 __ movp(receiver, Operand(rbp, argumentsOffset)); // load arguments 1116 __ movp(receiver, Operand(rbp, argumentsOffset)); // load arguments
1115 1117
1116 // Use inline caching to speed up access to arguments. 1118 // Use inline caching to speed up access to arguments.
1117 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); 1119 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
1120 Handle<TypeFeedbackVector> feedback_vector =
1121 masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
1122 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
1123 __ Move(slot, Smi::FromInt(index));
1124 __ Move(vector, feedback_vector);
1125 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
1118 __ Call(ic, RelocInfo::CODE_TARGET); 1126 __ Call(ic, RelocInfo::CODE_TARGET);
1119 // It is important that we do not have a test instruction after the 1127 // It is important that we do not have a test instruction after the
1120 // call. A test instruction after the call is used to indicate that 1128 // call. A test instruction after the call is used to indicate that
1121 // we have generated an inline version of the keyed load. In this 1129 // we have generated an inline version of the keyed load. In this
1122 // case, we know that we are not generating a test instruction next. 1130 // case, we know that we are not generating a test instruction next.
1123 1131
1124 // Push the nth argument. 1132 // Push the nth argument.
1125 __ Push(rax); 1133 __ Push(rax);
1126 1134
1127 // Update the index on the stack and in register key. 1135 // Update the index on the stack and in register key.
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 __ ret(0); 1784 __ ret(0);
1777 } 1785 }
1778 1786
1779 1787
1780 #undef __ 1788 #undef __
1781 1789
1782 } // namespace internal 1790 } // namespace internal
1783 } // namespace v8 1791 } // namespace v8
1784 1792
1785 #endif // V8_TARGET_ARCH_X64 1793 #endif // V8_TARGET_ARCH_X64
OLDNEW
« 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