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

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

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 4 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/mips64/interface-descriptors-mips64.cc ('k') | 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 #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 {
11 11
12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } 12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; }
13 13
14 void CallInterfaceDescriptor::DefaultInitializePlatformSpecific( 14 void CallInterfaceDescriptor::DefaultInitializePlatformSpecific(
15 CallInterfaceDescriptorData* data, int register_parameter_count) { 15 CallInterfaceDescriptorData* data, int register_parameter_count) {
16 const Register default_stub_registers[] = {rax, rbx, rcx, rdx, rdi}; 16 const Register default_stub_registers[] = {rax, rbx, rcx, rdx, rdi};
17 CHECK_LE(static_cast<size_t>(register_parameter_count), 17 CHECK_LE(static_cast<size_t>(register_parameter_count),
18 arraysize(default_stub_registers)); 18 arraysize(default_stub_registers));
19 data->InitializePlatformSpecific(register_parameter_count, 19 data->InitializePlatformSpecific(register_parameter_count,
20 default_stub_registers); 20 default_stub_registers);
21 } 21 }
22 22
23 const Register FastNewFunctionContextDescriptor::FunctionRegister() {
24 return rdi;
25 }
26 const Register FastNewFunctionContextDescriptor::SlotsRegister() { return rax; }
27
23 const Register LoadDescriptor::ReceiverRegister() { return rdx; } 28 const Register LoadDescriptor::ReceiverRegister() { return rdx; }
24 const Register LoadDescriptor::NameRegister() { return rcx; } 29 const Register LoadDescriptor::NameRegister() { return rcx; }
25 const Register LoadDescriptor::SlotRegister() { return rax; } 30 const Register LoadDescriptor::SlotRegister() { return rax; }
26 31
27 32
28 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; } 33 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; }
29 34
30 35
31 const Register StoreDescriptor::ReceiverRegister() { return rdx; } 36 const Register StoreDescriptor::ReceiverRegister() { return rdx; }
32 const Register StoreDescriptor::NameRegister() { return rcx; } 37 const Register StoreDescriptor::NameRegister() { return rcx; }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; } 69 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; }
65 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; } 70 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; }
66 71
67 72
68 void FastNewClosureDescriptor::InitializePlatformSpecific( 73 void FastNewClosureDescriptor::InitializePlatformSpecific(
69 CallInterfaceDescriptorData* data) { 74 CallInterfaceDescriptorData* data) {
70 Register registers[] = {rbx}; 75 Register registers[] = {rbx};
71 data->InitializePlatformSpecific(arraysize(registers), registers); 76 data->InitializePlatformSpecific(arraysize(registers), registers);
72 } 77 }
73 78
74 void FastNewFunctionContextDescriptor::InitializePlatformSpecific(
75 CallInterfaceDescriptorData* data) {
76 Register registers[] = {rdi};
77 data->InitializePlatformSpecific(arraysize(registers), registers);
78 }
79
80 void FastNewObjectDescriptor::InitializePlatformSpecific( 79 void FastNewObjectDescriptor::InitializePlatformSpecific(
81 CallInterfaceDescriptorData* data) { 80 CallInterfaceDescriptorData* data) {
82 Register registers[] = {rdi, rdx}; 81 Register registers[] = {rdi, rdx};
83 data->InitializePlatformSpecific(arraysize(registers), registers); 82 data->InitializePlatformSpecific(arraysize(registers), registers);
84 } 83 }
85 84
86 void FastNewRestParameterDescriptor::InitializePlatformSpecific( 85 void FastNewRestParameterDescriptor::InitializePlatformSpecific(
87 CallInterfaceDescriptorData* data) { 86 CallInterfaceDescriptorData* data) {
88 Register registers[] = {rdi}; 87 Register registers[] = {rdi};
89 data->InitializePlatformSpecific(arraysize(registers), registers); 88 data->InitializePlatformSpecific(arraysize(registers), registers);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 rbx, // the JSGeneratorObject to resume 402 rbx, // the JSGeneratorObject to resume
404 rdx // the resume mode (tagged) 403 rdx // the resume mode (tagged)
405 }; 404 };
406 data->InitializePlatformSpecific(arraysize(registers), registers); 405 data->InitializePlatformSpecific(arraysize(registers), registers);
407 } 406 }
408 407
409 } // namespace internal 408 } // namespace internal
410 } // namespace v8 409 } // namespace v8
411 410
412 #endif // V8_TARGET_ARCH_X64 411 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/interface-descriptors-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698