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 517993002: Refactoring InterfaceDescriptors away from code-stubs.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/code-stubs-ia32.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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/v8.h"
6
7 #if V8_TARGET_ARCH_IA32
8
9 #include "src/interface-descriptors.h"
10
11 namespace v8 {
12 namespace internal {
13
14 const Register InterfaceDescriptor::ContextRegister() { return esi; }
15
16
17 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
18 {
19 CallInterfaceDescriptor* descriptor =
20 isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall);
21 Register registers[] = {
22 esi, // context
23 edi, // JSFunction
24 eax, // actual number of arguments
25 ebx, // expected number of arguments
26 };
27 Representation representations[] = {
28 Representation::Tagged(), // context
29 Representation::Tagged(), // JSFunction
30 Representation::Integer32(), // actual number of arguments
31 Representation::Integer32(), // expected number of arguments
32 };
33 descriptor->Initialize(arraysize(registers), registers, representations);
34 }
35 {
36 CallInterfaceDescriptor* descriptor =
37 isolate->call_descriptor(CallDescriptorKey::KeyedCall);
38 Register registers[] = {
39 esi, // context
40 ecx, // key
41 };
42 Representation representations[] = {
43 Representation::Tagged(), // context
44 Representation::Tagged(), // key
45 };
46 descriptor->Initialize(arraysize(registers), registers, representations);
47 }
48 {
49 CallInterfaceDescriptor* descriptor =
50 isolate->call_descriptor(CallDescriptorKey::NamedCall);
51 Register registers[] = {
52 esi, // context
53 ecx, // name
54 };
55 Representation representations[] = {
56 Representation::Tagged(), // context
57 Representation::Tagged(), // name
58 };
59 descriptor->Initialize(arraysize(registers), registers, representations);
60 }
61 {
62 CallInterfaceDescriptor* descriptor =
63 isolate->call_descriptor(CallDescriptorKey::CallHandler);
64 Register registers[] = {
65 esi, // context
66 edx, // name
67 };
68 Representation representations[] = {
69 Representation::Tagged(), // context
70 Representation::Tagged(), // receiver
71 };
72 descriptor->Initialize(arraysize(registers), registers, representations);
73 }
74 {
75 CallInterfaceDescriptor* descriptor =
76 isolate->call_descriptor(CallDescriptorKey::ApiFunctionCall);
77 Register registers[] = {
78 esi, // context
79 eax, // callee
80 ebx, // call_data
81 ecx, // holder
82 edx, // api_function_address
83 };
84 Representation representations[] = {
85 Representation::Tagged(), // context
86 Representation::Tagged(), // callee
87 Representation::Tagged(), // call_data
88 Representation::Tagged(), // holder
89 Representation::External(), // api_function_address
90 };
91 descriptor->Initialize(arraysize(registers), registers, representations);
92 }
93 }
94 }
95 } // namespace v8::internal
96
97 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698