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

Side by Side Diff: src/x64/interface-descriptors-x64.cc

Issue 2930623002: [builtins] Start refactoring the Apply builtin. (Closed)
Patch Set: Address feedback. Created 3 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/v8.gyp ('k') | src/x64/macro-assembler-x64.h » ('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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 149
150 void CallTrampolineDescriptor::InitializePlatformSpecific( 150 void CallTrampolineDescriptor::InitializePlatformSpecific(
151 CallInterfaceDescriptorData* data) { 151 CallInterfaceDescriptorData* data) {
152 // rax : number of arguments 152 // rax : number of arguments
153 // rdi : the target to call 153 // rdi : the target to call
154 Register registers[] = {rdi, rax}; 154 Register registers[] = {rdi, rax};
155 data->InitializePlatformSpecific(arraysize(registers), registers); 155 data->InitializePlatformSpecific(arraysize(registers), registers);
156 } 156 }
157 157
158 void CallVarargsDescriptor::InitializePlatformSpecific(
159 CallInterfaceDescriptorData* data) {
160 // rax : number of arguments (on the stack, not including receiver)
161 // rdi : the target to call
162 // rbx : arguments list (FixedArray)
163 // rcx : arguments list length (untagged)
164 Register registers[] = {rdi, rax, rbx, rcx};
165 data->InitializePlatformSpecific(arraysize(registers), registers);
166 }
167
158 void CallForwardVarargsDescriptor::InitializePlatformSpecific( 168 void CallForwardVarargsDescriptor::InitializePlatformSpecific(
159 CallInterfaceDescriptorData* data) { 169 CallInterfaceDescriptorData* data) {
160 // rax : number of arguments 170 // rax : number of arguments
161 // rcx : start index (to support rest parameters) 171 // rcx : start index (to support rest parameters)
162 // rdi : the target to call 172 // rdi : the target to call
163 Register registers[] = {rdi, rax, rcx}; 173 Register registers[] = {rdi, rax, rcx};
164 data->InitializePlatformSpecific(arraysize(registers), registers); 174 data->InitializePlatformSpecific(arraysize(registers), registers);
165 } 175 }
166 176
177 void CallWithArrayLikeDescriptor::InitializePlatformSpecific(
178 CallInterfaceDescriptorData* data) {
179 // rdi : the target to call
180 // rbx : the arguments list
181 Register registers[] = {rdi, rbx};
182 data->InitializePlatformSpecific(arraysize(registers), registers);
183 }
184
185 void ConstructVarargsDescriptor::InitializePlatformSpecific(
186 CallInterfaceDescriptorData* data) {
187 // rax : number of arguments (on the stack, not including receiver)
188 // rdi : the target to call
189 // rdx : the new target
190 // rbx : arguments list (FixedArray)
191 // rcx : arguments list length (untagged)
192 Register registers[] = {rdi, rdx, rax, rbx, rcx};
193 data->InitializePlatformSpecific(arraysize(registers), registers);
194 }
195
167 void ConstructForwardVarargsDescriptor::InitializePlatformSpecific( 196 void ConstructForwardVarargsDescriptor::InitializePlatformSpecific(
168 CallInterfaceDescriptorData* data) { 197 CallInterfaceDescriptorData* data) {
169 // rax : number of arguments 198 // rax : number of arguments
170 // rdx : the new target 199 // rdx : the new target
171 // rcx : start index (to support rest parameters) 200 // rcx : start index (to support rest parameters)
172 // rdi : the target to call 201 // rdi : the target to call
173 Register registers[] = {rdi, rdx, rax, rcx}; 202 Register registers[] = {rdi, rdx, rax, rcx};
174 data->InitializePlatformSpecific(arraysize(registers), registers); 203 data->InitializePlatformSpecific(arraysize(registers), registers);
175 } 204 }
176 205
206 void ConstructWithArrayLikeDescriptor::InitializePlatformSpecific(
207 CallInterfaceDescriptorData* data) {
208 // rdi : the target to call
209 // rdx : the new target
210 // rbx : the arguments list
211 Register registers[] = {rdi, rdx, rbx};
212 data->InitializePlatformSpecific(arraysize(registers), registers);
213 }
214
177 void ConstructStubDescriptor::InitializePlatformSpecific( 215 void ConstructStubDescriptor::InitializePlatformSpecific(
178 CallInterfaceDescriptorData* data) { 216 CallInterfaceDescriptorData* data) {
179 // rax : number of arguments 217 // rax : number of arguments
180 // rdx : the new target 218 // rdx : the new target
181 // rdi : the target to call 219 // rdi : the target to call
182 // rbx : allocation site or undefined 220 // rbx : allocation site or undefined
183 Register registers[] = {rdi, rdx, rax, rbx}; 221 Register registers[] = {rdi, rdx, rax, rbx};
184 data->InitializePlatformSpecific(arraysize(registers), registers); 222 data->InitializePlatformSpecific(arraysize(registers), registers);
185 } 223 }
186 224
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 Register registers[] = { 421 Register registers[] = {
384 rbx, // loaded new FP 422 rbx, // loaded new FP
385 }; 423 };
386 data->InitializePlatformSpecific(arraysize(registers), registers); 424 data->InitializePlatformSpecific(arraysize(registers), registers);
387 } 425 }
388 426
389 } // namespace internal 427 } // namespace internal
390 } // namespace v8 428 } // namespace v8
391 429
392 #endif // V8_TARGET_ARCH_X64 430 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698