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

Side by Side Diff: src/x87/interface-descriptors-x87.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/x64/interface-descriptors-x64.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_X87 5 #if V8_TARGET_ARCH_X87
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 ebx, // the JSGeneratorObject to resume 423 ebx, // the JSGeneratorObject to resume
418 edx // the resume mode (tagged) 424 edx // the resume mode (tagged)
419 }; 425 };
420 data->InitializePlatformSpecific(arraysize(registers), registers); 426 data->InitializePlatformSpecific(arraysize(registers), registers);
421 } 427 }
422 428
423 } // namespace internal 429 } // namespace internal
424 } // namespace v8 430 } // namespace v8
425 431
426 #endif // V8_TARGET_ARCH_X87 432 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/interface-descriptors-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698