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

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

Issue 535103002: CallDescriptors::InitializeForIsolate() is no longer needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/isolate.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/interface-descriptors.h" 9 #include "src/interface-descriptors.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 const Register ElementTransitionAndStoreDescriptor::MapRegister() { 55 const Register ElementTransitionAndStoreDescriptor::MapRegister() {
56 return rbx; 56 return rbx;
57 } 57 }
58 58
59 59
60 const Register InstanceofDescriptor::left() { return rax; } 60 const Register InstanceofDescriptor::left() { return rax; }
61 const Register InstanceofDescriptor::right() { return rdx; } 61 const Register InstanceofDescriptor::right() { return rdx; }
62 62
63 63
64 void FastNewClosureDescriptor::Initialize(Isolate* isolate) { 64 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
65 Register registers[] = {rsi, rbx}; 65 Register registers[] = {rsi, rbx};
66 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 66 data->Initialize(arraysize(registers), registers, NULL);
67 } 67 }
68 68
69 69
70 void FastNewContextDescriptor::Initialize(Isolate* isolate) { 70 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
71 Register registers[] = {rsi, rdi}; 71 Register registers[] = {rsi, rdi};
72 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 72 data->Initialize(arraysize(registers), registers, NULL);
73 } 73 }
74 74
75 75
76 void ToNumberDescriptor::Initialize(Isolate* isolate) { 76 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
77 // ToNumberStub invokes a function, and therefore needs a context. 77 // ToNumberStub invokes a function, and therefore needs a context.
78 Register registers[] = {rsi, rax}; 78 Register registers[] = {rsi, rax};
79 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 79 data->Initialize(arraysize(registers), registers, NULL);
80 } 80 }
81 81
82 82
83 void NumberToStringDescriptor::Initialize(Isolate* isolate) { 83 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
84 Register registers[] = {rsi, rax}; 84 Register registers[] = {rsi, rax};
85 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 85 data->Initialize(arraysize(registers), registers, NULL);
86 } 86 }
87 87
88 88
89 void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) { 89 void FastCloneShallowArrayDescriptor::Initialize(
90 CallInterfaceDescriptorData* data) {
90 Register registers[] = {rsi, rax, rbx, rcx}; 91 Register registers[] = {rsi, rax, rbx, rcx};
91 Representation representations[] = { 92 Representation representations[] = {
92 Representation::Tagged(), Representation::Tagged(), Representation::Smi(), 93 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
93 Representation::Tagged()}; 94 Representation::Tagged()};
94 InitializeData(isolate, key(), arraysize(registers), registers, 95 data->Initialize(arraysize(registers), registers, representations);
95 representations);
96 } 96 }
97 97
98 98
99 void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) { 99 void FastCloneShallowObjectDescriptor::Initialize(
100 CallInterfaceDescriptorData* data) {
100 Register registers[] = {rsi, rax, rbx, rcx, rdx}; 101 Register registers[] = {rsi, rax, rbx, rcx, rdx};
101 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 102 data->Initialize(arraysize(registers), registers, NULL);
102 } 103 }
103 104
104 105
105 void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) { 106 void CreateAllocationSiteDescriptor::Initialize(
107 CallInterfaceDescriptorData* data) {
106 Register registers[] = {rsi, rbx, rdx}; 108 Register registers[] = {rsi, rbx, rdx};
107 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 109 data->Initialize(arraysize(registers), registers, NULL);
108 } 110 }
109 111
110 112
111 void CallFunctionDescriptor::Initialize(Isolate* isolate) { 113 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
112 Register registers[] = {rsi, rdi}; 114 Register registers[] = {rsi, rdi};
113 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 115 data->Initialize(arraysize(registers), registers, NULL);
114 } 116 }
115 117
116 118
117 void CallConstructDescriptor::Initialize(Isolate* isolate) { 119 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
118 // rax : number of arguments 120 // rax : number of arguments
119 // rbx : feedback vector 121 // rbx : feedback vector
120 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback 122 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback
121 // vector (Smi) 123 // vector (Smi)
122 // rdi : constructor function 124 // rdi : constructor function
123 // TODO(turbofan): So far we don't gather type feedback and hence skip the 125 // TODO(turbofan): So far we don't gather type feedback and hence skip the
124 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 126 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
125 Register registers[] = {rsi, rax, rdi, rbx}; 127 Register registers[] = {rsi, rax, rdi, rbx};
126 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 128 data->Initialize(arraysize(registers), registers, NULL);
127 } 129 }
128 130
129 131
130 void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) { 132 void RegExpConstructResultDescriptor::Initialize(
133 CallInterfaceDescriptorData* data) {
131 Register registers[] = {rsi, rcx, rbx, rax}; 134 Register registers[] = {rsi, rcx, rbx, rax};
132 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 135 data->Initialize(arraysize(registers), registers, NULL);
133 } 136 }
134 137
135 138
136 void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) { 139 void TransitionElementsKindDescriptor::Initialize(
140 CallInterfaceDescriptorData* data) {
137 Register registers[] = {rsi, rax, rbx}; 141 Register registers[] = {rsi, rax, rbx};
138 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 142 data->Initialize(arraysize(registers), registers, NULL);
139 } 143 }
140 144
141 145
142 void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) { 146 void ArrayConstructorConstantArgCountDescriptor::Initialize(
147 CallInterfaceDescriptorData* data) {
143 // register state 148 // register state
144 // rax -- number of arguments 149 // rax -- number of arguments
145 // rdi -- function 150 // rdi -- function
146 // rbx -- allocation site with elements kind 151 // rbx -- allocation site with elements kind
147 Register registers[] = {rsi, rdi, rbx}; 152 Register registers[] = {rsi, rdi, rbx};
148 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 153 data->Initialize(arraysize(registers), registers, NULL);
149 } 154 }
150 155
151 156
152 void ArrayConstructorDescriptor::Initialize(Isolate* isolate) { 157 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
153 // stack param count needs (constructor pointer, and single argument) 158 // stack param count needs (constructor pointer, and single argument)
154 Register registers[] = {rsi, rdi, rbx, rax}; 159 Register registers[] = {rsi, rdi, rbx, rax};
155 Representation representations[] = { 160 Representation representations[] = {
156 Representation::Tagged(), Representation::Tagged(), 161 Representation::Tagged(), Representation::Tagged(),
157 Representation::Tagged(), Representation::Integer32()}; 162 Representation::Tagged(), Representation::Integer32()};
158 InitializeData(isolate, key(), arraysize(registers), registers, 163 data->Initialize(arraysize(registers), registers, representations);
159 representations);
160 } 164 }
161 165
162 166
163 void InternalArrayConstructorConstantArgCountDescriptor::Initialize( 167 void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
164 Isolate* isolate) { 168 CallInterfaceDescriptorData* data) {
165 // register state 169 // register state
166 // rsi -- context 170 // rsi -- context
167 // rax -- number of arguments 171 // rax -- number of arguments
168 // rdi -- constructor function 172 // rdi -- constructor function
169 Register registers[] = {rsi, rdi}; 173 Register registers[] = {rsi, rdi};
170 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 174 data->Initialize(arraysize(registers), registers, NULL);
171 } 175 }
172 176
173 177
174 void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) { 178 void InternalArrayConstructorDescriptor::Initialize(
179 CallInterfaceDescriptorData* data) {
175 // stack param count needs (constructor pointer, and single argument) 180 // stack param count needs (constructor pointer, and single argument)
176 Register registers[] = {rsi, rdi, rax}; 181 Register registers[] = {rsi, rdi, rax};
177 Representation representations[] = {Representation::Tagged(), 182 Representation representations[] = {Representation::Tagged(),
178 Representation::Tagged(), 183 Representation::Tagged(),
179 Representation::Integer32()}; 184 Representation::Integer32()};
180 InitializeData(isolate, key(), arraysize(registers), registers, 185 data->Initialize(arraysize(registers), registers, representations);
181 representations);
182 } 186 }
183 187
184 188
185 void CompareNilDescriptor::Initialize(Isolate* isolate) { 189 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
186 Register registers[] = {rsi, rax}; 190 Register registers[] = {rsi, rax};
187 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 191 data->Initialize(arraysize(registers), registers, NULL);
188 } 192 }
189 193
190 194
191 void ToBooleanDescriptor::Initialize(Isolate* isolate) { 195 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
192 Register registers[] = {rsi, rax}; 196 Register registers[] = {rsi, rax};
193 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 197 data->Initialize(arraysize(registers), registers, NULL);
194 } 198 }
195 199
196 200
197 void BinaryOpDescriptor::Initialize(Isolate* isolate) { 201 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
198 Register registers[] = {rsi, rdx, rax}; 202 Register registers[] = {rsi, rdx, rax};
199 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 203 data->Initialize(arraysize(registers), registers, NULL);
200 } 204 }
201 205
202 206
203 void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) { 207 void BinaryOpWithAllocationSiteDescriptor::Initialize(
208 CallInterfaceDescriptorData* data) {
204 Register registers[] = {rsi, rcx, rdx, rax}; 209 Register registers[] = {rsi, rcx, rdx, rax};
205 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 210 data->Initialize(arraysize(registers), registers, NULL);
206 } 211 }
207 212
208 213
209 void StringAddDescriptor::Initialize(Isolate* isolate) { 214 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
210 Register registers[] = {rsi, rdx, rax}; 215 Register registers[] = {rsi, rdx, rax};
211 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 216 data->Initialize(arraysize(registers), registers, NULL);
212 } 217 }
213 218
214 219
215 void KeyedDescriptor::Initialize(Isolate* isolate) { 220 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
216 Register registers[] = { 221 Register registers[] = {
217 rsi, // context 222 rsi, // context
218 rcx, // key 223 rcx, // key
219 }; 224 };
220 Representation representations[] = { 225 Representation representations[] = {
221 Representation::Tagged(), // context 226 Representation::Tagged(), // context
222 Representation::Tagged(), // key 227 Representation::Tagged(), // key
223 }; 228 };
224 InitializeData(isolate, key(), arraysize(registers), registers, 229 data->Initialize(arraysize(registers), registers, representations);
225 representations);
226 } 230 }
227 231
228 232
229 void NamedDescriptor::Initialize(Isolate* isolate) { 233 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
230 Register registers[] = { 234 Register registers[] = {
231 rsi, // context 235 rsi, // context
232 rcx, // name 236 rcx, // name
233 }; 237 };
234 Representation representations[] = { 238 Representation representations[] = {
235 Representation::Tagged(), // context 239 Representation::Tagged(), // context
236 Representation::Tagged(), // name 240 Representation::Tagged(), // name
237 }; 241 };
238 InitializeData(isolate, key(), arraysize(registers), registers, 242 data->Initialize(arraysize(registers), registers, representations);
239 representations);
240 } 243 }
241 244
242 245
243 void CallHandlerDescriptor::Initialize(Isolate* isolate) { 246 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
244 Register registers[] = { 247 Register registers[] = {
245 rsi, // context 248 rsi, // context
246 rdx, // receiver 249 rdx, // receiver
247 }; 250 };
248 Representation representations[] = { 251 Representation representations[] = {
249 Representation::Tagged(), // context 252 Representation::Tagged(), // context
250 Representation::Tagged(), // receiver 253 Representation::Tagged(), // receiver
251 }; 254 };
252 InitializeData(isolate, key(), arraysize(registers), registers, 255 data->Initialize(arraysize(registers), registers, representations);
253 representations);
254 } 256 }
255 257
256 258
257 void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) { 259 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
258 Register registers[] = { 260 Register registers[] = {
259 rsi, // context 261 rsi, // context
260 rdi, // JSFunction 262 rdi, // JSFunction
261 rax, // actual number of arguments 263 rax, // actual number of arguments
262 rbx, // expected number of arguments 264 rbx, // expected number of arguments
263 }; 265 };
264 Representation representations[] = { 266 Representation representations[] = {
265 Representation::Tagged(), // context 267 Representation::Tagged(), // context
266 Representation::Tagged(), // JSFunction 268 Representation::Tagged(), // JSFunction
267 Representation::Integer32(), // actual number of arguments 269 Representation::Integer32(), // actual number of arguments
268 Representation::Integer32(), // expected number of arguments 270 Representation::Integer32(), // expected number of arguments
269 }; 271 };
270 InitializeData(isolate, key(), arraysize(registers), registers, 272 data->Initialize(arraysize(registers), registers, representations);
271 representations);
272 } 273 }
273 274
274 275
275 void ApiFunctionDescriptor::Initialize(Isolate* isolate) { 276 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
276 Register registers[] = { 277 Register registers[] = {
277 rsi, // context 278 rsi, // context
278 rax, // callee 279 rax, // callee
279 rbx, // call_data 280 rbx, // call_data
280 rcx, // holder 281 rcx, // holder
281 rdx, // api_function_address 282 rdx, // api_function_address
282 }; 283 };
283 Representation representations[] = { 284 Representation representations[] = {
284 Representation::Tagged(), // context 285 Representation::Tagged(), // context
285 Representation::Tagged(), // callee 286 Representation::Tagged(), // callee
286 Representation::Tagged(), // call_data 287 Representation::Tagged(), // call_data
287 Representation::Tagged(), // holder 288 Representation::Tagged(), // holder
288 Representation::External(), // api_function_address 289 Representation::External(), // api_function_address
289 }; 290 };
290 InitializeData(isolate, key(), arraysize(registers), registers, 291 data->Initialize(arraysize(registers), registers, representations);
291 representations);
292 } 292 }
293 } 293 }
294 } // namespace v8::internal 294 } // namespace v8::internal
295 295
296 #endif // V8_TARGET_ARCH_X64 296 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698