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

Side by Side Diff: src/ic/x64/handler-compiler-x64.cc

Issue 883613003: fix performance regression on intel call api stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ic/ia32/handler-compiler-ia32.cc ('k') | src/x64/code-stubs-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Write the arguments to stack frame. 140 // Write the arguments to stack frame.
141 if (is_store) { 141 if (is_store) {
142 DCHECK(!receiver.is(store_parameter)); 142 DCHECK(!receiver.is(store_parameter));
143 DCHECK(!scratch_in.is(store_parameter)); 143 DCHECK(!scratch_in.is(store_parameter));
144 __ Push(store_parameter); 144 __ Push(store_parameter);
145 } 145 }
146 __ PushReturnAddressFrom(scratch_in); 146 __ PushReturnAddressFrom(scratch_in);
147 // Stack now matches JSFunction abi. 147 // Stack now matches JSFunction abi.
148 148
149 // Abi for CallApiFunctionStub. 149 // Abi for CallApiFunctionStub.
150 Register callee = rax; 150 Register callee = rdi;
151 Register call_data = rbx; 151 Register call_data = rbx;
152 Register holder = rcx; 152 Register holder = rcx;
153 Register api_function_address = rdx; 153 Register api_function_address = rdx;
154 Register scratch = rdi; // scratch_in is no longer valid. 154 Register scratch = rax; // scratch_in is no longer valid.
155 155
156 // Put holder in place. 156 // Put holder in place.
157 CallOptimization::HolderLookup holder_lookup; 157 CallOptimization::HolderLookup holder_lookup;
158 Handle<JSObject> api_holder = 158 Handle<JSObject> api_holder =
159 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); 159 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup);
160 switch (holder_lookup) { 160 switch (holder_lookup) {
161 case CallOptimization::kHolderIsReceiver: 161 case CallOptimization::kHolderIsReceiver:
162 __ Move(holder, receiver); 162 __ Move(holder, receiver);
163 break; 163 break;
164 case CallOptimization::kHolderFound: 164 case CallOptimization::kHolderFound:
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // Return the generated code. 747 // Return the generated code.
748 return GetCode(kind(), Code::NORMAL, name); 748 return GetCode(kind(), Code::NORMAL, name);
749 } 749 }
750 750
751 751
752 #undef __ 752 #undef __
753 } 753 }
754 } // namespace v8::internal 754 } // namespace v8::internal
755 755
756 #endif // V8_TARGET_ARCH_X64 756 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698