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

Side by Side Diff: src/ia32/builtins-ia32.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/arm64/builtins-arm64.cc ('k') | src/mips/builtins-mips.cc » ('j') | 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_IA32 7 #if V8_TARGET_ARCH_IA32
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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1037
1038 1038
1039 static void Generate_PushAppliedArguments(MacroAssembler* masm, 1039 static void Generate_PushAppliedArguments(MacroAssembler* masm,
1040 const int argumentsOffset, 1040 const int argumentsOffset,
1041 const int indexOffset, 1041 const int indexOffset,
1042 const int limitOffset) { 1042 const int limitOffset) {
1043 // Copy all arguments from the array to the stack. 1043 // Copy all arguments from the array to the stack.
1044 Label entry, loop; 1044 Label entry, loop;
1045 Register receiver = LoadDescriptor::ReceiverRegister(); 1045 Register receiver = LoadDescriptor::ReceiverRegister();
1046 Register key = LoadDescriptor::NameRegister(); 1046 Register key = LoadDescriptor::NameRegister();
1047 Register slot = LoadDescriptor::SlotRegister();
1048 Register vector = LoadWithVectorDescriptor::VectorRegister();
1047 __ mov(key, Operand(ebp, indexOffset)); 1049 __ mov(key, Operand(ebp, indexOffset));
1048 __ jmp(&entry); 1050 __ jmp(&entry);
1049 __ bind(&loop); 1051 __ bind(&loop);
1050 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments 1052 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments
1051 1053
1052 // Use inline caching to speed up access to arguments. 1054 // Use inline caching to speed up access to arguments.
1053 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); 1055 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
1056 Handle<TypeFeedbackVector> feedback_vector =
1057 masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
1058 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
1059 __ mov(slot, Immediate(Smi::FromInt(index)));
1060 __ mov(vector, Immediate(feedback_vector));
1061 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
1054 __ call(ic, RelocInfo::CODE_TARGET); 1062 __ call(ic, RelocInfo::CODE_TARGET);
1055 // It is important that we do not have a test instruction after the 1063 // It is important that we do not have a test instruction after the
1056 // call. A test instruction after the call is used to indicate that 1064 // call. A test instruction after the call is used to indicate that
1057 // we have generated an inline version of the keyed load. In this 1065 // we have generated an inline version of the keyed load. In this
1058 // case, we know that we are not generating a test instruction next. 1066 // case, we know that we are not generating a test instruction next.
1059 1067
1060 // Push the nth argument. 1068 // Push the nth argument.
1061 __ push(eax); 1069 __ push(eax);
1062 1070
1063 // Update the index on the stack and in register key. 1071 // Update the index on the stack and in register key.
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 1708
1701 __ bind(&ok); 1709 __ bind(&ok);
1702 __ ret(0); 1710 __ ret(0);
1703 } 1711 }
1704 1712
1705 #undef __ 1713 #undef __
1706 } // namespace internal 1714 } // namespace internal
1707 } // namespace v8 1715 } // namespace v8
1708 1716
1709 #endif // V8_TARGET_ARCH_IA32 1717 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698