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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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_X87 7 #if V8_TARGET_ARCH_X87
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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1045
1046 1046
1047 static void Generate_PushAppliedArguments(MacroAssembler* masm, 1047 static void Generate_PushAppliedArguments(MacroAssembler* masm,
1048 const int argumentsOffset, 1048 const int argumentsOffset,
1049 const int indexOffset, 1049 const int indexOffset,
1050 const int limitOffset) { 1050 const int limitOffset) {
1051 // Copy all arguments from the array to the stack. 1051 // Copy all arguments from the array to the stack.
1052 Label entry, loop; 1052 Label entry, loop;
1053 Register receiver = LoadDescriptor::ReceiverRegister(); 1053 Register receiver = LoadDescriptor::ReceiverRegister();
1054 Register key = LoadDescriptor::NameRegister(); 1054 Register key = LoadDescriptor::NameRegister();
1055 Register slot = LoadDescriptor::SlotRegister();
1056 Register vector = LoadWithVectorDescriptor::VectorRegister();
1055 __ mov(key, Operand(ebp, indexOffset)); 1057 __ mov(key, Operand(ebp, indexOffset));
1056 __ jmp(&entry); 1058 __ jmp(&entry);
1057 __ bind(&loop); 1059 __ bind(&loop);
1058 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments 1060 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments
1059 1061
1060 // Use inline caching to speed up access to arguments. 1062 // Use inline caching to speed up access to arguments.
1061 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); 1063 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
1064 Handle<TypeFeedbackVector> feedback_vector =
1065 masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
1066 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
1067 __ mov(slot, Immediate(Smi::FromInt(index)));
1068 __ mov(vector, Immediate(feedback_vector));
1069 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
1062 __ call(ic, RelocInfo::CODE_TARGET); 1070 __ call(ic, RelocInfo::CODE_TARGET);
1063 // It is important that we do not have a test instruction after the 1071 // It is important that we do not have a test instruction after the
1064 // call. A test instruction after the call is used to indicate that 1072 // call. A test instruction after the call is used to indicate that
1065 // we have generated an inline version of the keyed load. In this 1073 // we have generated an inline version of the keyed load. In this
1066 // case, we know that we are not generating a test instruction next. 1074 // case, we know that we are not generating a test instruction next.
1067 1075
1068 // Push the nth argument. 1076 // Push the nth argument.
1069 __ push(eax); 1077 __ push(eax);
1070 1078
1071 // Update the index on the stack and in register key. 1079 // Update the index on the stack and in register key.
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 1716
1709 __ bind(&ok); 1717 __ bind(&ok);
1710 __ ret(0); 1718 __ ret(0);
1711 } 1719 }
1712 1720
1713 #undef __ 1721 #undef __
1714 } // namespace internal 1722 } // namespace internal
1715 } // namespace v8 1723 } // namespace v8
1716 1724
1717 #endif // V8_TARGET_ARCH_X87 1725 #endif // V8_TARGET_ARCH_X87
OLDNEW
« 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