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

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

Issue 1119263002: X87: 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 | « 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 __ mov(key, Operand(ebp, indexOffset)); 1055 __ mov(key, Operand(ebp, indexOffset));
1056 __ jmp(&entry); 1056 __ jmp(&entry);
1057 __ bind(&loop); 1057 __ bind(&loop);
1058 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments 1058 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments
1059 1059
1060 if (FLAG_vector_ics) { 1060 // Use inline caching to speed up access to arguments.
1061 // TODO(mvstanton): Vector-based ics need additional infrastructure to 1061 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic();
1062 // be embedded here. For now, just call the runtime. 1062 __ call(ic, RelocInfo::CODE_TARGET);
1063 __ push(receiver); 1063 // It is important that we do not have a test instruction after the
1064 __ push(key); 1064 // call. A test instruction after the call is used to indicate that
1065 __ CallRuntime(Runtime::kGetProperty, 2); 1065 // we have generated an inline version of the keyed load. In this
1066 } else { 1066 // case, we know that we are not generating a test instruction next.
1067 // Use inline caching to speed up access to arguments.
1068 Handle<Code> ic = CodeFactory::KeyedLoadIC(masm->isolate()).code();
1069 __ call(ic, RelocInfo::CODE_TARGET);
1070 // It is important that we do not have a test instruction after the
1071 // call. A test instruction after the call is used to indicate that
1072 // we have generated an inline version of the keyed load. In this
1073 // case, we know that we are not generating a test instruction next.
1074 }
1075 1067
1076 // Push the nth argument. 1068 // Push the nth argument.
1077 __ push(eax); 1069 __ push(eax);
1078 1070
1079 // Update the index on the stack and in register key. 1071 // Update the index on the stack and in register key.
1080 __ mov(key, Operand(ebp, indexOffset)); 1072 __ mov(key, Operand(ebp, indexOffset));
1081 __ add(key, Immediate(1 << kSmiTagSize)); 1073 __ add(key, Immediate(1 << kSmiTagSize));
1082 __ mov(Operand(ebp, indexOffset), key); 1074 __ mov(Operand(ebp, indexOffset), key);
1083 1075
1084 __ bind(&entry); 1076 __ bind(&entry);
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 1687
1696 __ bind(&ok); 1688 __ bind(&ok);
1697 __ ret(0); 1689 __ ret(0);
1698 } 1690 }
1699 1691
1700 #undef __ 1692 #undef __
1701 } 1693 }
1702 } // namespace v8::internal 1694 } // namespace v8::internal
1703 1695
1704 #endif // V8_TARGET_ARCH_X87 1696 #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