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

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

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: Rebasing Created 4 years, 5 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/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('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 #include "src/interface-descriptors.h" 5 #include "src/interface-descriptors.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 namespace { 10 namespace {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return ""; 73 return "";
74 } 74 }
75 75
76 76
77 void VoidDescriptor::InitializePlatformSpecific( 77 void VoidDescriptor::InitializePlatformSpecific(
78 CallInterfaceDescriptorData* data) { 78 CallInterfaceDescriptorData* data) {
79 data->InitializePlatformSpecific(0, nullptr); 79 data->InitializePlatformSpecific(0, nullptr);
80 } 80 }
81 81
82 FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( 82 FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType(
83 Isolate* isolate, int paramater_count) { 83 Isolate* isolate, int parameter_count) {
84 Zone* zone = isolate->interface_descriptor_zone(); 84 Zone* zone = isolate->interface_descriptor_zone();
85 FunctionType* function = 85 FunctionType* function =
86 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 86 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
87 function->InitParameter(0, AnyTagged(zone)); 87 function->InitParameter(0, AnyTagged(zone));
88 function->InitParameter(1, AnyTagged(zone)); 88 function->InitParameter(1, AnyTagged(zone));
89 function->InitParameter(2, SmiType(zone)); 89 function->InitParameter(2, SmiType(zone));
90 return function; 90 return function;
91 } 91 }
92 92
93 93
94 void LoadDescriptor::InitializePlatformSpecific( 94 void LoadDescriptor::InitializePlatformSpecific(
95 CallInterfaceDescriptorData* data) { 95 CallInterfaceDescriptorData* data) {
96 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; 96 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()};
97 data->InitializePlatformSpecific(arraysize(registers), registers); 97 data->InitializePlatformSpecific(arraysize(registers), registers);
98 } 98 }
99 99
100 FunctionType* LoadGlobalDescriptor::BuildCallInterfaceDescriptorFunctionType( 100 FunctionType* LoadGlobalDescriptor::BuildCallInterfaceDescriptorFunctionType(
101 Isolate* isolate, int paramater_count) { 101 Isolate* isolate, int parameter_count) {
102 Zone* zone = isolate->interface_descriptor_zone(); 102 Zone* zone = isolate->interface_descriptor_zone();
103 FunctionType* function = 103 FunctionType* function =
104 Type::Function(AnyTagged(zone), Type::Undefined(), 1, zone)->AsFunction(); 104 Type::Function(AnyTagged(zone), Type::Undefined(), 1, zone)->AsFunction();
105 function->InitParameter(0, SmiType(zone)); 105 function->InitParameter(0, SmiType(zone));
106 return function; 106 return function;
107 } 107 }
108 108
109 void LoadGlobalDescriptor::InitializePlatformSpecific( 109 void LoadGlobalDescriptor::InitializePlatformSpecific(
110 CallInterfaceDescriptorData* data) { 110 CallInterfaceDescriptorData* data) {
111 Register registers[] = {LoadWithVectorDescriptor::SlotRegister()}; 111 Register registers[] = {LoadWithVectorDescriptor::SlotRegister()};
112 data->InitializePlatformSpecific(arraysize(registers), registers); 112 data->InitializePlatformSpecific(arraysize(registers), registers);
113 } 113 }
114 114
115 FunctionType* 115 FunctionType*
116 LoadGlobalWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( 116 LoadGlobalWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType(
117 Isolate* isolate, int paramater_count) { 117 Isolate* isolate, int parameter_count) {
118 Zone* zone = isolate->interface_descriptor_zone(); 118 Zone* zone = isolate->interface_descriptor_zone();
119 FunctionType* function = 119 FunctionType* function =
120 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); 120 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction();
121 function->InitParameter(0, SmiType(zone)); 121 function->InitParameter(0, SmiType(zone));
122 function->InitParameter(1, AnyTagged(zone)); 122 function->InitParameter(1, AnyTagged(zone));
123 return function; 123 return function;
124 } 124 }
125 125
126 void LoadGlobalWithVectorDescriptor::InitializePlatformSpecific( 126 void LoadGlobalWithVectorDescriptor::InitializePlatformSpecific(
127 CallInterfaceDescriptorData* data) { 127 CallInterfaceDescriptorData* data) {
128 Register registers[] = {LoadWithVectorDescriptor::SlotRegister(), 128 Register registers[] = {LoadWithVectorDescriptor::SlotRegister(),
129 LoadWithVectorDescriptor::VectorRegister()}; 129 LoadWithVectorDescriptor::VectorRegister()};
130 data->InitializePlatformSpecific(arraysize(registers), registers); 130 data->InitializePlatformSpecific(arraysize(registers), registers);
131 } 131 }
132 132
133 FunctionType* StoreDescriptor::BuildCallInterfaceDescriptorFunctionType(
134 Isolate* isolate, int parameter_count) {
135 Zone* zone = isolate->interface_descriptor_zone();
136 FunctionType* function =
137 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
138 function->InitParameter(0, AnyTagged(zone));
139 function->InitParameter(1, AnyTagged(zone));
140 function->InitParameter(2, AnyTagged(zone));
141 function->InitParameter(3, SmiType(zone));
142 return function;
143 }
144
133 void StoreDescriptor::InitializePlatformSpecific( 145 void StoreDescriptor::InitializePlatformSpecific(
134 CallInterfaceDescriptorData* data) { 146 CallInterfaceDescriptorData* data) {
135 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; 147 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
148 SlotRegister()};
136 data->InitializePlatformSpecific(arraysize(registers), registers); 149 data->InitializePlatformSpecific(arraysize(registers), registers);
137 } 150 }
138 151
139 152
140 void StoreTransitionDescriptor::InitializePlatformSpecific( 153 void StoreTransitionDescriptor::InitializePlatformSpecific(
141 CallInterfaceDescriptorData* data) { 154 CallInterfaceDescriptorData* data) {
142 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), 155 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
143 MapRegister()}; 156 MapRegister()};
144 157
145 data->InitializePlatformSpecific(arraysize(registers), registers); 158 data->InitializePlatformSpecific(arraysize(registers), registers);
146 } 159 }
147 160
148 161
149 void VectorStoreTransitionDescriptor::InitializePlatformSpecific( 162 void VectorStoreTransitionDescriptor::InitializePlatformSpecific(
150 CallInterfaceDescriptorData* data) { 163 CallInterfaceDescriptorData* data) {
151 if (SlotRegister().is(no_reg)) { 164 if (SlotRegister().is(no_reg)) {
152 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), 165 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
153 MapRegister(), VectorRegister()}; 166 MapRegister(), VectorRegister()};
154 data->InitializePlatformSpecific(arraysize(registers), registers); 167 data->InitializePlatformSpecific(arraysize(registers), registers);
155 } else { 168 } else {
156 Register registers[] = {ReceiverRegister(), NameRegister(), 169 Register registers[] = {ReceiverRegister(), NameRegister(),
157 ValueRegister(), MapRegister(), 170 ValueRegister(), MapRegister(),
158 SlotRegister(), VectorRegister()}; 171 SlotRegister(), VectorRegister()};
159 data->InitializePlatformSpecific(arraysize(registers), registers); 172 data->InitializePlatformSpecific(arraysize(registers), registers);
160 } 173 }
161 } 174 }
162 175
163 FunctionType* 176 FunctionType*
164 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( 177 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType(
165 Isolate* isolate, int paramater_count) { 178 Isolate* isolate, int parameter_count) {
166 Zone* zone = isolate->interface_descriptor_zone(); 179 Zone* zone = isolate->interface_descriptor_zone();
167 FunctionType* function = 180 FunctionType* function =
168 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 181 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
169 function->InitParameter(0, AnyTagged(zone)); // Receiver 182 function->InitParameter(0, AnyTagged(zone)); // Receiver
170 function->InitParameter(1, AnyTagged(zone)); // Name 183 function->InitParameter(1, AnyTagged(zone)); // Name
171 function->InitParameter(2, AnyTagged(zone)); // Value 184 function->InitParameter(2, AnyTagged(zone)); // Value
172 function->InitParameter(3, AnyTagged(zone)); // Map 185 function->InitParameter(3, AnyTagged(zone)); // Map
173 return function; 186 return function;
174 } 187 }
175 188
176 FunctionType* 189 FunctionType*
177 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( 190 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType(
178 Isolate* isolate, int paramater_count) { 191 Isolate* isolate, int parameter_count) {
179 Zone* zone = isolate->interface_descriptor_zone(); 192 Zone* zone = isolate->interface_descriptor_zone();
180 FunctionType* function = 193 FunctionType* function =
181 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); 194 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction();
182 function->InitParameter(0, UntaggedIntegral32(zone)); 195 function->InitParameter(0, UntaggedIntegral32(zone));
183 function->InitParameter(1, AnyTagged(zone)); 196 function->InitParameter(1, AnyTagged(zone));
184 return function; 197 return function;
185 } 198 }
186 199
187 200
188 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific( 201 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific(
(...skipping 22 matching lines...) Expand all
211 } 224 }
212 225
213 void MathPowIntegerDescriptor::InitializePlatformSpecific( 226 void MathPowIntegerDescriptor::InitializePlatformSpecific(
214 CallInterfaceDescriptorData* data) { 227 CallInterfaceDescriptorData* data) {
215 Register registers[] = {exponent()}; 228 Register registers[] = {exponent()};
216 data->InitializePlatformSpecific(arraysize(registers), registers); 229 data->InitializePlatformSpecific(arraysize(registers), registers);
217 } 230 }
218 231
219 FunctionType* 232 FunctionType*
220 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( 233 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType(
221 Isolate* isolate, int paramater_count) { 234 Isolate* isolate, int parameter_count) {
222 Zone* zone = isolate->interface_descriptor_zone(); 235 Zone* zone = isolate->interface_descriptor_zone();
223 FunctionType* function = 236 FunctionType* function =
224 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 237 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
225 function->InitParameter(0, AnyTagged(zone)); 238 function->InitParameter(0, AnyTagged(zone));
226 function->InitParameter(1, AnyTagged(zone)); 239 function->InitParameter(1, AnyTagged(zone));
227 function->InitParameter(2, SmiType(zone)); 240 function->InitParameter(2, SmiType(zone));
228 function->InitParameter(3, AnyTagged(zone)); 241 function->InitParameter(3, AnyTagged(zone));
229 return function; 242 return function;
230 } 243 }
231 244
232 245
233 void LoadWithVectorDescriptor::InitializePlatformSpecific( 246 void LoadWithVectorDescriptor::InitializePlatformSpecific(
234 CallInterfaceDescriptorData* data) { 247 CallInterfaceDescriptorData* data) {
235 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), 248 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(),
236 VectorRegister()}; 249 VectorRegister()};
237 data->InitializePlatformSpecific(arraysize(registers), registers); 250 data->InitializePlatformSpecific(arraysize(registers), registers);
238 } 251 }
239 252
240 FunctionType* 253 FunctionType*
241 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( 254 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType(
242 Isolate* isolate, int paramater_count) { 255 Isolate* isolate, int parameter_count) {
243 Zone* zone = isolate->interface_descriptor_zone(); 256 Zone* zone = isolate->interface_descriptor_zone();
244 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg); 257 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg);
245 int arg_count = has_slot ? 6 : 5; 258 int arg_count = has_slot ? 6 : 5;
246 FunctionType* function = 259 FunctionType* function =
247 Type::Function(AnyTagged(zone), Type::Undefined(), arg_count, zone) 260 Type::Function(AnyTagged(zone), Type::Undefined(), arg_count, zone)
248 ->AsFunction(); 261 ->AsFunction();
249 int index = 0; 262 int index = 0;
250 function->InitParameter(index++, AnyTagged(zone)); // receiver 263 function->InitParameter(index++, AnyTagged(zone)); // receiver
251 function->InitParameter(index++, AnyTagged(zone)); // name 264 function->InitParameter(index++, AnyTagged(zone)); // name
252 function->InitParameter(index++, AnyTagged(zone)); // value 265 function->InitParameter(index++, AnyTagged(zone)); // value
253 function->InitParameter(index++, AnyTagged(zone)); // map 266 function->InitParameter(index++, AnyTagged(zone)); // map
254 if (has_slot) { 267 if (has_slot) {
255 function->InitParameter(index++, SmiType(zone)); // slot 268 function->InitParameter(index++, SmiType(zone)); // slot
256 } 269 }
257 function->InitParameter(index++, AnyTagged(zone)); // vector 270 function->InitParameter(index++, AnyTagged(zone)); // vector
258 return function; 271 return function;
259 } 272 }
260 273
261 FunctionType* VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( 274 FunctionType*
262 Isolate* isolate, int paramater_count) { 275 StoreWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType(
276 Isolate* isolate, int parameter_count) {
263 Zone* zone = isolate->interface_descriptor_zone(); 277 Zone* zone = isolate->interface_descriptor_zone();
264 FunctionType* function = 278 FunctionType* function =
265 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction(); 279 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction();
266 function->InitParameter(0, AnyTagged(zone)); 280 function->InitParameter(0, AnyTagged(zone));
267 function->InitParameter(1, AnyTagged(zone)); 281 function->InitParameter(1, AnyTagged(zone));
268 function->InitParameter(2, AnyTagged(zone)); 282 function->InitParameter(2, AnyTagged(zone));
269 function->InitParameter(3, SmiType(zone)); 283 function->InitParameter(3, SmiType(zone));
270 function->InitParameter(4, AnyTagged(zone)); 284 function->InitParameter(4, AnyTagged(zone));
271 return function; 285 return function;
272 } 286 }
273 287
274 288 void StoreWithVectorDescriptor::InitializePlatformSpecific(
275 void VectorStoreICDescriptor::InitializePlatformSpecific(
276 CallInterfaceDescriptorData* data) { 289 CallInterfaceDescriptorData* data) {
277 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), 290 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
278 SlotRegister(), VectorRegister()}; 291 SlotRegister(), VectorRegister()};
279 data->InitializePlatformSpecific(arraysize(registers), registers); 292 data->InitializePlatformSpecific(arraysize(registers), registers);
280 } 293 }
281 294
282 FunctionType*
283 VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType(
284 Isolate* isolate, int paramater_count) {
285 Zone* zone = isolate->interface_descriptor_zone();
286 FunctionType* function =
287 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
288 function->InitParameter(0, AnyTagged(zone));
289 function->InitParameter(1, AnyTagged(zone));
290 function->InitParameter(2, AnyTagged(zone));
291 function->InitParameter(3, SmiType(zone));
292 return function;
293 }
294
295
296 void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific(
297 CallInterfaceDescriptorData* data) {
298 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
299 SlotRegister()};
300 data->InitializePlatformSpecific(arraysize(registers), registers);
301 }
302
303 const Register ApiGetterDescriptor::ReceiverRegister() { 295 const Register ApiGetterDescriptor::ReceiverRegister() {
304 return LoadDescriptor::ReceiverRegister(); 296 return LoadDescriptor::ReceiverRegister();
305 } 297 }
306 298
307 void ApiGetterDescriptor::InitializePlatformSpecific( 299 void ApiGetterDescriptor::InitializePlatformSpecific(
308 CallInterfaceDescriptorData* data) { 300 CallInterfaceDescriptorData* data) {
309 Register registers[] = {ReceiverRegister(), HolderRegister(), 301 Register registers[] = {ReceiverRegister(), HolderRegister(),
310 CallbackRegister()}; 302 CallbackRegister()};
311 data->InitializePlatformSpecific(arraysize(registers), registers); 303 data->InitializePlatformSpecific(arraysize(registers), registers);
312 } 304 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 352 }
361 353
362 void GrowArrayElementsDescriptor::InitializePlatformSpecific( 354 void GrowArrayElementsDescriptor::InitializePlatformSpecific(
363 CallInterfaceDescriptorData* data) { 355 CallInterfaceDescriptorData* data) {
364 Register registers[] = {ObjectRegister(), KeyRegister()}; 356 Register registers[] = {ObjectRegister(), KeyRegister()};
365 data->InitializePlatformSpecific(arraysize(registers), registers); 357 data->InitializePlatformSpecific(arraysize(registers), registers);
366 } 358 }
367 359
368 FunctionType* 360 FunctionType*
369 VarArgFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( 361 VarArgFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType(
370 Isolate* isolate, int paramater_count) { 362 Isolate* isolate, int parameter_count) {
371 Zone* zone = isolate->interface_descriptor_zone(); 363 Zone* zone = isolate->interface_descriptor_zone();
372 FunctionType* function = 364 FunctionType* function =
373 Type::Function(AnyTagged(zone), AnyTagged(zone), 1, zone)->AsFunction(); 365 Type::Function(AnyTagged(zone), AnyTagged(zone), 1, zone)->AsFunction();
374 function->InitParameter(0, UntaggedIntegral32(zone)); // actual #arguments 366 function->InitParameter(0, UntaggedIntegral32(zone)); // actual #arguments
375 return function; 367 return function;
376 } 368 }
377 369
378 FunctionType* 370 FunctionType*
379 FastCloneRegExpDescriptor::BuildCallInterfaceDescriptorFunctionType( 371 FastCloneRegExpDescriptor::BuildCallInterfaceDescriptorFunctionType(
380 Isolate* isolate, int paramater_count) { 372 Isolate* isolate, int parameter_count) {
381 Zone* zone = isolate->interface_descriptor_zone(); 373 Zone* zone = isolate->interface_descriptor_zone();
382 FunctionType* function = 374 FunctionType* function =
383 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 375 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
384 function->InitParameter(0, AnyTagged(zone)); // closure 376 function->InitParameter(0, AnyTagged(zone)); // closure
385 function->InitParameter(1, SmiType(zone)); // literal_index 377 function->InitParameter(1, SmiType(zone)); // literal_index
386 function->InitParameter(2, AnyTagged(zone)); // pattern 378 function->InitParameter(2, AnyTagged(zone)); // pattern
387 function->InitParameter(3, AnyTagged(zone)); // flags 379 function->InitParameter(3, AnyTagged(zone)); // flags
388 return function; 380 return function;
389 } 381 }
390 382
391 FunctionType* 383 FunctionType*
392 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType( 384 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType(
393 Isolate* isolate, int paramater_count) { 385 Isolate* isolate, int parameter_count) {
394 Zone* zone = isolate->interface_descriptor_zone(); 386 Zone* zone = isolate->interface_descriptor_zone();
395 FunctionType* function = 387 FunctionType* function =
396 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 388 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
397 function->InitParameter(0, AnyTagged(zone)); 389 function->InitParameter(0, AnyTagged(zone));
398 function->InitParameter(1, SmiType(zone)); 390 function->InitParameter(1, SmiType(zone));
399 function->InitParameter(2, AnyTagged(zone)); 391 function->InitParameter(2, AnyTagged(zone));
400 return function; 392 return function;
401 } 393 }
402 394
403 FunctionType* 395 FunctionType*
404 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType( 396 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType(
405 Isolate* isolate, int paramater_count) { 397 Isolate* isolate, int parameter_count) {
406 Zone* zone = isolate->interface_descriptor_zone(); 398 Zone* zone = isolate->interface_descriptor_zone();
407 FunctionType* function = 399 FunctionType* function =
408 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); 400 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction();
409 function->InitParameter(0, AnyTagged(zone)); 401 function->InitParameter(0, AnyTagged(zone));
410 function->InitParameter(1, SmiType(zone)); 402 function->InitParameter(1, SmiType(zone));
411 return function; 403 return function;
412 } 404 }
413 405
414 FunctionType* 406 FunctionType*
415 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType( 407 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType(
416 Isolate* isolate, int paramater_count) { 408 Isolate* isolate, int parameter_count) {
417 Zone* zone = isolate->interface_descriptor_zone(); 409 Zone* zone = isolate->interface_descriptor_zone();
418 FunctionType* function = 410 FunctionType* function =
419 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 411 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
420 function->InitParameter(0, AnyTagged(zone)); 412 function->InitParameter(0, AnyTagged(zone));
421 function->InitParameter(1, SmiType(zone)); 413 function->InitParameter(1, SmiType(zone));
422 function->InitParameter(2, AnyTagged(zone)); 414 function->InitParameter(2, AnyTagged(zone));
423 return function; 415 return function;
424 } 416 }
425 417
426 FunctionType* 418 FunctionType*
427 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( 419 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType(
428 Isolate* isolate, int paramater_count) { 420 Isolate* isolate, int parameter_count) {
429 Zone* zone = isolate->interface_descriptor_zone(); 421 Zone* zone = isolate->interface_descriptor_zone();
430 FunctionType* function = 422 FunctionType* function =
431 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); 423 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction();
432 function->InitParameter(0, AnyTagged(zone)); // target 424 function->InitParameter(0, AnyTagged(zone)); // target
433 function->InitParameter(1, UntaggedIntegral32(zone)); // actual #arguments 425 function->InitParameter(1, UntaggedIntegral32(zone)); // actual #arguments
434 return function; 426 return function;
435 } 427 }
436 428
437 FunctionType* ConstructStubDescriptor::BuildCallInterfaceDescriptorFunctionType( 429 FunctionType* ConstructStubDescriptor::BuildCallInterfaceDescriptorFunctionType(
438 Isolate* isolate, int paramater_count) { 430 Isolate* isolate, int parameter_count) {
439 Zone* zone = isolate->interface_descriptor_zone(); 431 Zone* zone = isolate->interface_descriptor_zone();
440 FunctionType* function = 432 FunctionType* function =
441 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 433 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
442 function->InitParameter(0, AnyTagged(zone)); // target 434 function->InitParameter(0, AnyTagged(zone)); // target
443 function->InitParameter(1, AnyTagged(zone)); // new.target 435 function->InitParameter(1, AnyTagged(zone)); // new.target
444 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments 436 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments
445 function->InitParameter(3, AnyTagged(zone)); // opt. allocation site 437 function->InitParameter(3, AnyTagged(zone)); // opt. allocation site
446 return function; 438 return function;
447 } 439 }
448 440
449 FunctionType* 441 FunctionType*
450 ConstructTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( 442 ConstructTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType(
451 Isolate* isolate, int paramater_count) { 443 Isolate* isolate, int parameter_count) {
452 Zone* zone = isolate->interface_descriptor_zone(); 444 Zone* zone = isolate->interface_descriptor_zone();
453 FunctionType* function = 445 FunctionType* function =
454 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 446 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
455 function->InitParameter(0, AnyTagged(zone)); // target 447 function->InitParameter(0, AnyTagged(zone)); // target
456 function->InitParameter(1, AnyTagged(zone)); // new.target 448 function->InitParameter(1, AnyTagged(zone)); // new.target
457 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments 449 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments
458 return function; 450 return function;
459 } 451 }
460 452
461 FunctionType* 453 FunctionType*
462 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( 454 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType(
463 Isolate* isolate, int paramater_count) { 455 Isolate* isolate, int parameter_count) {
464 Zone* zone = isolate->interface_descriptor_zone(); 456 Zone* zone = isolate->interface_descriptor_zone();
465 FunctionType* function = 457 FunctionType* function =
466 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); 458 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction();
467 function->InitParameter(0, Type::Receiver()); // JSFunction 459 function->InitParameter(0, Type::Receiver()); // JSFunction
468 function->InitParameter(1, SmiType(zone)); 460 function->InitParameter(1, SmiType(zone));
469 return function; 461 return function;
470 } 462 }
471 463
472 FunctionType* CallFunctionWithFeedbackAndVectorDescriptor:: 464 FunctionType* CallFunctionWithFeedbackAndVectorDescriptor::
473 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, 465 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
474 int paramater_count) { 466 int parameter_count) {
475 Zone* zone = isolate->interface_descriptor_zone(); 467 Zone* zone = isolate->interface_descriptor_zone();
476 FunctionType* function = 468 FunctionType* function =
477 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 469 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
478 function->InitParameter(0, Type::Receiver()); // JSFunction 470 function->InitParameter(0, Type::Receiver()); // JSFunction
479 function->InitParameter(1, SmiType(zone)); 471 function->InitParameter(1, SmiType(zone));
480 function->InitParameter(2, AnyTagged(zone)); 472 function->InitParameter(2, AnyTagged(zone));
481 return function; 473 return function;
482 } 474 }
483 475
484 FunctionType* 476 FunctionType*
485 ArrayNoArgumentConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( 477 ArrayNoArgumentConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
486 Isolate* isolate, int paramater_count) { 478 Isolate* isolate, int parameter_count) {
487 Zone* zone = isolate->interface_descriptor_zone(); 479 Zone* zone = isolate->interface_descriptor_zone();
488 FunctionType* function = 480 FunctionType* function =
489 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 481 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
490 function->InitParameter(0, Type::Receiver()); // JSFunction 482 function->InitParameter(0, Type::Receiver()); // JSFunction
491 function->InitParameter(1, AnyTagged(zone)); 483 function->InitParameter(1, AnyTagged(zone));
492 function->InitParameter(2, UntaggedIntegral32(zone)); 484 function->InitParameter(2, UntaggedIntegral32(zone));
493 function->InitParameter(3, AnyTagged(zone)); 485 function->InitParameter(3, AnyTagged(zone));
494 return function; 486 return function;
495 } 487 }
496 488
497 FunctionType* ArraySingleArgumentConstructorDescriptor:: 489 FunctionType* ArraySingleArgumentConstructorDescriptor::
498 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, 490 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
499 int paramater_count) { 491 int parameter_count) {
500 Zone* zone = isolate->interface_descriptor_zone(); 492 Zone* zone = isolate->interface_descriptor_zone();
501 FunctionType* function = 493 FunctionType* function =
502 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction(); 494 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction();
503 function->InitParameter(0, Type::Receiver()); // JSFunction 495 function->InitParameter(0, Type::Receiver()); // JSFunction
504 function->InitParameter(1, AnyTagged(zone)); 496 function->InitParameter(1, AnyTagged(zone));
505 function->InitParameter(2, UntaggedIntegral32(zone)); 497 function->InitParameter(2, UntaggedIntegral32(zone));
506 function->InitParameter(3, AnyTagged(zone)); 498 function->InitParameter(3, AnyTagged(zone));
507 function->InitParameter(4, AnyTagged(zone)); 499 function->InitParameter(4, AnyTagged(zone));
508 return function; 500 return function;
509 } 501 }
510 502
511 FunctionType* 503 FunctionType*
512 ArrayNArgumentsConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( 504 ArrayNArgumentsConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
513 Isolate* isolate, int paramater_count) { 505 Isolate* isolate, int parameter_count) {
514 Zone* zone = isolate->interface_descriptor_zone(); 506 Zone* zone = isolate->interface_descriptor_zone();
515 FunctionType* function = 507 FunctionType* function =
516 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); 508 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction();
517 function->InitParameter(0, Type::Receiver()); // JSFunction 509 function->InitParameter(0, Type::Receiver()); // JSFunction
518 function->InitParameter(1, AnyTagged(zone)); // Allocation site or undefined 510 function->InitParameter(1, AnyTagged(zone)); // Allocation site or undefined
519 function->InitParameter(2, UntaggedIntegral32(zone)); // Arg count 511 function->InitParameter(2, UntaggedIntegral32(zone)); // Arg count
520 return function; 512 return function;
521 } 513 }
522 514
523 FunctionType* 515 FunctionType*
524 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( 516 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType(
525 Isolate* isolate, int paramater_count) { 517 Isolate* isolate, int parameter_count) {
526 Zone* zone = isolate->interface_descriptor_zone(); 518 Zone* zone = isolate->interface_descriptor_zone();
527 FunctionType* function = 519 FunctionType* function =
528 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 520 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
529 function->InitParameter(0, Type::Receiver()); // JSFunction 521 function->InitParameter(0, Type::Receiver()); // JSFunction
530 function->InitParameter(1, AnyTagged(zone)); // the new target 522 function->InitParameter(1, AnyTagged(zone)); // the new target
531 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments 523 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments
532 function->InitParameter(3, UntaggedIntegral32(zone)); // expected #arguments 524 function->InitParameter(3, UntaggedIntegral32(zone)); // expected #arguments
533 return function; 525 return function;
534 } 526 }
535 527
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); 575 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction();
584 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); 576 function->InitParameter(kAccumulatorParameter, AnyTagged(zone));
585 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); 577 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone));
586 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); 578 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone));
587 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); 579 function->InitParameter(kDispatchTableParameter, AnyTagged(zone));
588 return function; 580 return function;
589 } 581 }
590 582
591 } // namespace internal 583 } // namespace internal
592 } // namespace v8 584 } // namespace v8
OLDNEW
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698