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

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

Issue 2002143002: [stubs] An easier way of defining a stub call interface descriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/arm64/interface-descriptors-arm64.cc ('k') | src/interface-descriptors.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 esi; } 12 const Register CallInterfaceDescriptor::ContextRegister() { return esi; }
13 13
14 void CallInterfaceDescriptor::DefaultInitializePlatformSpecific(
15 CallInterfaceDescriptorData* data, int register_parameter_count) {
16 const Register default_stub_registers[] = {eax, ebx, ecx, edx, edi};
17 CHECK_LE(static_cast<size_t>(register_parameter_count),
18 arraysize(default_stub_registers));
19 data->InitializePlatformSpecific(register_parameter_count,
20 default_stub_registers);
21 }
14 22
15 const Register LoadDescriptor::ReceiverRegister() { return edx; } 23 const Register LoadDescriptor::ReceiverRegister() { return edx; }
16 const Register LoadDescriptor::NameRegister() { return ecx; } 24 const Register LoadDescriptor::NameRegister() { return ecx; }
17 const Register LoadDescriptor::SlotRegister() { return eax; } 25 const Register LoadDescriptor::SlotRegister() { return eax; }
18 26
19 const Register LoadWithVectorDescriptor::VectorRegister() { return ebx; } 27 const Register LoadWithVectorDescriptor::VectorRegister() { return ebx; }
20 28
21 29
22 const Register StoreDescriptor::ReceiverRegister() { return edx; } 30 const Register StoreDescriptor::ReceiverRegister() { return edx; }
23 const Register StoreDescriptor::NameRegister() { return ecx; } 31 const Register StoreDescriptor::NameRegister() { return ecx; }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 69
62 70
63 const Register MathPowIntegerDescriptor::exponent() { 71 const Register MathPowIntegerDescriptor::exponent() {
64 return MathPowTaggedDescriptor::exponent(); 72 return MathPowTaggedDescriptor::exponent();
65 } 73 }
66 74
67 75
68 const Register GrowArrayElementsDescriptor::ObjectRegister() { return eax; } 76 const Register GrowArrayElementsDescriptor::ObjectRegister() { return eax; }
69 const Register GrowArrayElementsDescriptor::KeyRegister() { return ebx; } 77 const Register GrowArrayElementsDescriptor::KeyRegister() { return ebx; }
70 78
71 const Register HasPropertyDescriptor::ObjectRegister() { return eax; }
72 const Register HasPropertyDescriptor::KeyRegister() { return ebx; }
73 79
74 void FastNewClosureDescriptor::InitializePlatformSpecific( 80 void FastNewClosureDescriptor::InitializePlatformSpecific(
75 CallInterfaceDescriptorData* data) { 81 CallInterfaceDescriptorData* data) {
76 Register registers[] = {ebx}; 82 Register registers[] = {ebx};
77 data->InitializePlatformSpecific(arraysize(registers), registers, NULL); 83 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
78 } 84 }
79 85
80 86
81 void FastNewContextDescriptor::InitializePlatformSpecific( 87 void FastNewContextDescriptor::InitializePlatformSpecific(
82 CallInterfaceDescriptorData* data) { 88 CallInterfaceDescriptorData* data) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 ebx, // the JSGeneratorObject to resume 425 ebx, // the JSGeneratorObject to resume
420 edx // the resume mode (tagged) 426 edx // the resume mode (tagged)
421 }; 427 };
422 data->InitializePlatformSpecific(arraysize(registers), registers); 428 data->InitializePlatformSpecific(arraysize(registers), registers);
423 } 429 }
424 430
425 } // namespace internal 431 } // namespace internal
426 } // namespace v8 432 } // namespace v8
427 433
428 #endif // V8_TARGET_ARCH_IA32 434 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698