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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 1120613002: VectorICs: built-in function apply should use an IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/bootstrapper.cc ('k') | src/x64/builtins-x64.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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 const int limitOffset) { 1045 const int limitOffset) {
1046 // Copy all arguments from the array to the stack. 1046 // Copy all arguments from the array to the stack.
1047 Label entry, loop; 1047 Label entry, loop;
1048 Register receiver = LoadDescriptor::ReceiverRegister(); 1048 Register receiver = LoadDescriptor::ReceiverRegister();
1049 Register key = LoadDescriptor::NameRegister(); 1049 Register key = LoadDescriptor::NameRegister();
1050 __ mov(key, Operand(ebp, indexOffset)); 1050 __ mov(key, Operand(ebp, indexOffset));
1051 __ jmp(&entry); 1051 __ jmp(&entry);
1052 __ bind(&loop); 1052 __ bind(&loop);
1053 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments 1053 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments
1054 1054
1055 if (FLAG_vector_ics) { 1055 // Use inline caching to speed up access to arguments.
1056 // TODO(mvstanton): Vector-based ics need additional infrastructure to 1056 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic();
1057 // be embedded here. For now, just call the runtime. 1057 __ call(ic, RelocInfo::CODE_TARGET);
1058 __ push(receiver); 1058 // It is important that we do not have a test instruction after the
1059 __ push(key); 1059 // call. A test instruction after the call is used to indicate that
1060 __ CallRuntime(Runtime::kGetProperty, 2); 1060 // we have generated an inline version of the keyed load. In this
1061 } else { 1061 // case, we know that we are not generating a test instruction next.
1062 // Use inline caching to speed up access to arguments.
1063 Handle<Code> ic = CodeFactory::KeyedLoadIC(masm->isolate()).code();
1064 __ call(ic, RelocInfo::CODE_TARGET);
1065 // It is important that we do not have a test instruction after the
1066 // call. A test instruction after the call is used to indicate that
1067 // we have generated an inline version of the keyed load. In this
1068 // case, we know that we are not generating a test instruction next.
1069 }
1070 1062
1071 // Push the nth argument. 1063 // Push the nth argument.
1072 __ push(eax); 1064 __ push(eax);
1073 1065
1074 // Update the index on the stack and in register key. 1066 // Update the index on the stack and in register key.
1075 __ mov(key, Operand(ebp, indexOffset)); 1067 __ mov(key, Operand(ebp, indexOffset));
1076 __ add(key, Immediate(1 << kSmiTagSize)); 1068 __ add(key, Immediate(1 << kSmiTagSize));
1077 __ mov(Operand(ebp, indexOffset), key); 1069 __ mov(Operand(ebp, indexOffset), key);
1078 1070
1079 __ bind(&entry); 1071 __ bind(&entry);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 1682
1691 __ bind(&ok); 1683 __ bind(&ok);
1692 __ ret(0); 1684 __ ret(0);
1693 } 1685 }
1694 1686
1695 #undef __ 1687 #undef __
1696 } 1688 }
1697 } // namespace v8::internal 1689 } // namespace v8::internal
1698 1690
1699 #endif // V8_TARGET_ARCH_IA32 1691 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698