| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 Type::Any(), | 24 Type::Any(), |
| 25 Type::Union(Type::TaggedPointer(), Type::TaggedSigned(), zone), zone); | 25 Type::Union(Type::TaggedPointer(), Type::TaggedSigned(), zone), zone); |
| 26 } | 26 } |
| 27 | 27 |
| 28 | 28 |
| 29 Type* ExternalPointer(Zone* zone) { | 29 Type* ExternalPointer(Zone* zone) { |
| 30 return Type::Intersect(Type::Internal(), Type::UntaggedPointer(), zone); | 30 return Type::Intersect(Type::Internal(), Type::UntaggedPointer(), zone); |
| 31 } | 31 } |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 | 34 FunctionType* CallInterfaceDescriptor::BuildDefaultFunctionType( |
| 35 Type::FunctionType* CallInterfaceDescriptor::BuildDefaultFunctionType( | |
| 36 Isolate* isolate, int parameter_count) { | 35 Isolate* isolate, int parameter_count) { |
| 37 Zone* zone = isolate->interface_descriptor_zone(); | 36 Zone* zone = isolate->interface_descriptor_zone(); |
| 38 Type::FunctionType* function = Type::FunctionType::New( | 37 FunctionType* function = |
| 39 AnyTagged(zone), Type::Undefined(), parameter_count, zone); | 38 Type::Function(AnyTagged(zone), Type::Undefined(), parameter_count, zone) |
| 39 ->AsFunction(); |
| 40 while (parameter_count-- != 0) { | 40 while (parameter_count-- != 0) { |
| 41 function->InitParameter(parameter_count, AnyTagged(zone)); | 41 function->InitParameter(parameter_count, AnyTagged(zone)); |
| 42 } | 42 } |
| 43 return function; | 43 return function; |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 void CallInterfaceDescriptorData::InitializePlatformSpecific( | 47 void CallInterfaceDescriptorData::InitializePlatformSpecific( |
| 48 int register_parameter_count, Register* registers, | 48 int register_parameter_count, Register* registers, |
| 49 PlatformInterfaceDescriptor* platform_descriptor) { | 49 PlatformInterfaceDescriptor* platform_descriptor) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 79 CallInterfaceDescriptorData* data) { | 79 CallInterfaceDescriptorData* data) { |
| 80 data->InitializePlatformSpecific(0, nullptr, nullptr); | 80 data->InitializePlatformSpecific(0, nullptr, nullptr); |
| 81 } | 81 } |
| 82 | 82 |
| 83 | 83 |
| 84 void VoidDescriptor::InitializePlatformSpecific( | 84 void VoidDescriptor::InitializePlatformSpecific( |
| 85 CallInterfaceDescriptorData* data) { | 85 CallInterfaceDescriptorData* data) { |
| 86 data->InitializePlatformSpecific(0, nullptr); | 86 data->InitializePlatformSpecific(0, nullptr); |
| 87 } | 87 } |
| 88 | 88 |
| 89 | 89 FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 90 Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 91 Isolate* isolate, int paramater_count) { | 90 Isolate* isolate, int paramater_count) { |
| 92 Zone* zone = isolate->interface_descriptor_zone(); | 91 Zone* zone = isolate->interface_descriptor_zone(); |
| 93 Type::FunctionType* function = | 92 FunctionType* function = |
| 94 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 93 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 95 function->InitParameter(0, AnyTagged(zone)); | 94 function->InitParameter(0, AnyTagged(zone)); |
| 96 function->InitParameter(1, AnyTagged(zone)); | 95 function->InitParameter(1, AnyTagged(zone)); |
| 97 function->InitParameter(2, SmiType(zone)); | 96 function->InitParameter(2, SmiType(zone)); |
| 98 return function; | 97 return function; |
| 99 } | 98 } |
| 100 | 99 |
| 101 | 100 |
| 102 void LoadDescriptor::InitializePlatformSpecific( | 101 void LoadDescriptor::InitializePlatformSpecific( |
| 103 CallInterfaceDescriptorData* data) { | 102 CallInterfaceDescriptorData* data) { |
| 104 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; | 103 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 129 MapRegister(), VectorRegister()}; | 128 MapRegister(), VectorRegister()}; |
| 130 data->InitializePlatformSpecific(arraysize(registers), registers); | 129 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 131 } else { | 130 } else { |
| 132 Register registers[] = {ReceiverRegister(), NameRegister(), | 131 Register registers[] = {ReceiverRegister(), NameRegister(), |
| 133 ValueRegister(), MapRegister(), | 132 ValueRegister(), MapRegister(), |
| 134 SlotRegister(), VectorRegister()}; | 133 SlotRegister(), VectorRegister()}; |
| 135 data->InitializePlatformSpecific(arraysize(registers), registers); | 134 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 136 } | 135 } |
| 137 } | 136 } |
| 138 | 137 |
| 139 | 138 FunctionType* |
| 140 Type::FunctionType* | |
| 141 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 139 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 142 Isolate* isolate, int paramater_count) { | 140 Isolate* isolate, int paramater_count) { |
| 143 Zone* zone = isolate->interface_descriptor_zone(); | 141 Zone* zone = isolate->interface_descriptor_zone(); |
| 144 Type::FunctionType* function = | 142 FunctionType* function = |
| 145 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 143 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 146 function->InitParameter(0, AnyTagged(zone)); // Receiver | 144 function->InitParameter(0, AnyTagged(zone)); // Receiver |
| 147 function->InitParameter(1, AnyTagged(zone)); // Name | 145 function->InitParameter(1, AnyTagged(zone)); // Name |
| 148 function->InitParameter(2, AnyTagged(zone)); // Value | 146 function->InitParameter(2, AnyTagged(zone)); // Value |
| 149 function->InitParameter(3, AnyTagged(zone)); // Map | 147 function->InitParameter(3, AnyTagged(zone)); // Map |
| 150 return function; | 148 return function; |
| 151 } | 149 } |
| 152 | 150 |
| 153 | 151 FunctionType* |
| 154 Type::FunctionType* | |
| 155 LoadGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( | 152 LoadGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 156 Isolate* isolate, int paramater_count) { | 153 Isolate* isolate, int paramater_count) { |
| 157 Zone* zone = isolate->interface_descriptor_zone(); | 154 Zone* zone = isolate->interface_descriptor_zone(); |
| 158 Type::FunctionType* function = | 155 FunctionType* function = |
| 159 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 1, zone); | 156 Type::Function(AnyTagged(zone), Type::Undefined(), 1, zone)->AsFunction(); |
| 160 function->InitParameter(0, UntaggedIntegral32(zone)); | 157 function->InitParameter(0, UntaggedIntegral32(zone)); |
| 161 return function; | 158 return function; |
| 162 } | 159 } |
| 163 | 160 |
| 164 | 161 |
| 165 void LoadGlobalViaContextDescriptor::InitializePlatformSpecific( | 162 void LoadGlobalViaContextDescriptor::InitializePlatformSpecific( |
| 166 CallInterfaceDescriptorData* data) { | 163 CallInterfaceDescriptorData* data) { |
| 167 Register registers[] = {SlotRegister()}; | 164 Register registers[] = {SlotRegister()}; |
| 168 data->InitializePlatformSpecific(arraysize(registers), registers); | 165 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 169 } | 166 } |
| 170 | 167 |
| 171 | 168 FunctionType* |
| 172 Type::FunctionType* | |
| 173 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( | 169 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 174 Isolate* isolate, int paramater_count) { | 170 Isolate* isolate, int paramater_count) { |
| 175 Zone* zone = isolate->interface_descriptor_zone(); | 171 Zone* zone = isolate->interface_descriptor_zone(); |
| 176 Type::FunctionType* function = | 172 FunctionType* function = |
| 177 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 173 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 178 function->InitParameter(0, UntaggedIntegral32(zone)); | 174 function->InitParameter(0, UntaggedIntegral32(zone)); |
| 179 function->InitParameter(1, AnyTagged(zone)); | 175 function->InitParameter(1, AnyTagged(zone)); |
| 180 return function; | 176 return function; |
| 181 } | 177 } |
| 182 | 178 |
| 183 | 179 |
| 184 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific( | 180 void StoreGlobalViaContextDescriptor::InitializePlatformSpecific( |
| 185 CallInterfaceDescriptorData* data) { | 181 CallInterfaceDescriptorData* data) { |
| 186 Register registers[] = {SlotRegister(), ValueRegister()}; | 182 Register registers[] = {SlotRegister(), ValueRegister()}; |
| 187 data->InitializePlatformSpecific(arraysize(registers), registers); | 183 data->InitializePlatformSpecific(arraysize(registers), registers); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 data->InitializePlatformSpecific(arraysize(registers), registers); | 232 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 237 } | 233 } |
| 238 | 234 |
| 239 | 235 |
| 240 void MathPowIntegerDescriptor::InitializePlatformSpecific( | 236 void MathPowIntegerDescriptor::InitializePlatformSpecific( |
| 241 CallInterfaceDescriptorData* data) { | 237 CallInterfaceDescriptorData* data) { |
| 242 Register registers[] = {exponent()}; | 238 Register registers[] = {exponent()}; |
| 243 data->InitializePlatformSpecific(arraysize(registers), registers); | 239 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 244 } | 240 } |
| 245 | 241 |
| 246 | 242 FunctionType* |
| 247 Type::FunctionType* | |
| 248 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 243 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 249 Isolate* isolate, int paramater_count) { | 244 Isolate* isolate, int paramater_count) { |
| 250 Zone* zone = isolate->interface_descriptor_zone(); | 245 Zone* zone = isolate->interface_descriptor_zone(); |
| 251 Type::FunctionType* function = | 246 FunctionType* function = |
| 252 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 247 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 253 function->InitParameter(0, AnyTagged(zone)); | 248 function->InitParameter(0, AnyTagged(zone)); |
| 254 function->InitParameter(1, AnyTagged(zone)); | 249 function->InitParameter(1, AnyTagged(zone)); |
| 255 function->InitParameter(2, SmiType(zone)); | 250 function->InitParameter(2, SmiType(zone)); |
| 256 function->InitParameter(3, AnyTagged(zone)); | 251 function->InitParameter(3, AnyTagged(zone)); |
| 257 return function; | 252 return function; |
| 258 } | 253 } |
| 259 | 254 |
| 260 | 255 |
| 261 void LoadWithVectorDescriptor::InitializePlatformSpecific( | 256 void LoadWithVectorDescriptor::InitializePlatformSpecific( |
| 262 CallInterfaceDescriptorData* data) { | 257 CallInterfaceDescriptorData* data) { |
| 263 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), | 258 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), |
| 264 VectorRegister()}; | 259 VectorRegister()}; |
| 265 data->InitializePlatformSpecific(arraysize(registers), registers); | 260 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 266 } | 261 } |
| 267 | 262 |
| 268 | 263 FunctionType* |
| 269 Type::FunctionType* | |
| 270 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 264 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 271 Isolate* isolate, int paramater_count) { | 265 Isolate* isolate, int paramater_count) { |
| 272 Zone* zone = isolate->interface_descriptor_zone(); | 266 Zone* zone = isolate->interface_descriptor_zone(); |
| 273 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg); | 267 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg); |
| 274 int arg_count = has_slot ? 6 : 5; | 268 int arg_count = has_slot ? 6 : 5; |
| 275 Type::FunctionType* function = Type::FunctionType::New( | 269 FunctionType* function = |
| 276 AnyTagged(zone), Type::Undefined(), arg_count, zone); | 270 Type::Function(AnyTagged(zone), Type::Undefined(), arg_count, zone) |
| 271 ->AsFunction(); |
| 277 int index = 0; | 272 int index = 0; |
| 278 function->InitParameter(index++, AnyTagged(zone)); // receiver | 273 function->InitParameter(index++, AnyTagged(zone)); // receiver |
| 279 function->InitParameter(index++, AnyTagged(zone)); // name | 274 function->InitParameter(index++, AnyTagged(zone)); // name |
| 280 function->InitParameter(index++, AnyTagged(zone)); // value | 275 function->InitParameter(index++, AnyTagged(zone)); // value |
| 281 function->InitParameter(index++, AnyTagged(zone)); // map | 276 function->InitParameter(index++, AnyTagged(zone)); // map |
| 282 if (has_slot) { | 277 if (has_slot) { |
| 283 function->InitParameter(index++, SmiType(zone)); // slot | 278 function->InitParameter(index++, SmiType(zone)); // slot |
| 284 } | 279 } |
| 285 function->InitParameter(index++, AnyTagged(zone)); // vector | 280 function->InitParameter(index++, AnyTagged(zone)); // vector |
| 286 return function; | 281 return function; |
| 287 } | 282 } |
| 288 | 283 |
| 289 | 284 FunctionType* VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 290 Type::FunctionType* | |
| 291 VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 292 Isolate* isolate, int paramater_count) { | 285 Isolate* isolate, int paramater_count) { |
| 293 Zone* zone = isolate->interface_descriptor_zone(); | 286 Zone* zone = isolate->interface_descriptor_zone(); |
| 294 Type::FunctionType* function = | 287 FunctionType* function = |
| 295 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 288 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction(); |
| 296 function->InitParameter(0, AnyTagged(zone)); | 289 function->InitParameter(0, AnyTagged(zone)); |
| 297 function->InitParameter(1, AnyTagged(zone)); | 290 function->InitParameter(1, AnyTagged(zone)); |
| 298 function->InitParameter(2, AnyTagged(zone)); | 291 function->InitParameter(2, AnyTagged(zone)); |
| 299 function->InitParameter(3, SmiType(zone)); | 292 function->InitParameter(3, SmiType(zone)); |
| 300 function->InitParameter(4, AnyTagged(zone)); | 293 function->InitParameter(4, AnyTagged(zone)); |
| 301 return function; | 294 return function; |
| 302 } | 295 } |
| 303 | 296 |
| 304 | 297 |
| 305 void VectorStoreICDescriptor::InitializePlatformSpecific( | 298 void VectorStoreICDescriptor::InitializePlatformSpecific( |
| 306 CallInterfaceDescriptorData* data) { | 299 CallInterfaceDescriptorData* data) { |
| 307 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), | 300 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
| 308 SlotRegister(), VectorRegister()}; | 301 SlotRegister(), VectorRegister()}; |
| 309 data->InitializePlatformSpecific(arraysize(registers), registers); | 302 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 310 } | 303 } |
| 311 | 304 |
| 312 | 305 FunctionType* |
| 313 Type::FunctionType* | |
| 314 VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( | 306 VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 315 Isolate* isolate, int paramater_count) { | 307 Isolate* isolate, int paramater_count) { |
| 316 Zone* zone = isolate->interface_descriptor_zone(); | 308 Zone* zone = isolate->interface_descriptor_zone(); |
| 317 Type::FunctionType* function = | 309 FunctionType* function = |
| 318 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 310 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 319 function->InitParameter(0, AnyTagged(zone)); | 311 function->InitParameter(0, AnyTagged(zone)); |
| 320 function->InitParameter(1, AnyTagged(zone)); | 312 function->InitParameter(1, AnyTagged(zone)); |
| 321 function->InitParameter(2, AnyTagged(zone)); | 313 function->InitParameter(2, AnyTagged(zone)); |
| 322 function->InitParameter(3, SmiType(zone)); | 314 function->InitParameter(3, SmiType(zone)); |
| 323 return function; | 315 return function; |
| 324 } | 316 } |
| 325 | 317 |
| 326 | 318 |
| 327 void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific( | 319 void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific( |
| 328 CallInterfaceDescriptorData* data) { | 320 CallInterfaceDescriptorData* data) { |
| 329 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), | 321 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
| 330 SlotRegister()}; | 322 SlotRegister()}; |
| 331 data->InitializePlatformSpecific(arraysize(registers), registers); | 323 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 332 } | 324 } |
| 333 | 325 |
| 334 | 326 FunctionType* ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 335 Type::FunctionType* | |
| 336 ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 337 Isolate* isolate, int paramater_count) { | 327 Isolate* isolate, int paramater_count) { |
| 338 Zone* zone = isolate->interface_descriptor_zone(); | 328 Zone* zone = isolate->interface_descriptor_zone(); |
| 339 Type::FunctionType* function = | 329 FunctionType* function = |
| 340 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 1, zone); | 330 Type::Function(AnyTagged(zone), Type::Undefined(), 1, zone)->AsFunction(); |
| 341 function->InitParameter(0, ExternalPointer(zone)); | 331 function->InitParameter(0, ExternalPointer(zone)); |
| 342 return function; | 332 return function; |
| 343 } | 333 } |
| 344 | 334 |
| 345 | 335 |
| 346 void ApiGetterDescriptor::InitializePlatformSpecific( | 336 void ApiGetterDescriptor::InitializePlatformSpecific( |
| 347 CallInterfaceDescriptorData* data) { | 337 CallInterfaceDescriptorData* data) { |
| 348 Register registers[] = {function_address()}; | 338 Register registers[] = {function_address()}; |
| 349 data->InitializePlatformSpecific(arraysize(registers), registers); | 339 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 350 } | 340 } |
| 351 | 341 |
| 352 | 342 |
| 353 void ArgumentsAccessReadDescriptor::InitializePlatformSpecific( | 343 void ArgumentsAccessReadDescriptor::InitializePlatformSpecific( |
| 354 CallInterfaceDescriptorData* data) { | 344 CallInterfaceDescriptorData* data) { |
| 355 Register registers[] = {index(), parameter_count()}; | 345 Register registers[] = {index(), parameter_count()}; |
| 356 data->InitializePlatformSpecific(arraysize(registers), registers); | 346 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 357 } | 347 } |
| 358 | 348 |
| 359 | 349 FunctionType* |
| 360 Type::FunctionType* | |
| 361 ArgumentsAccessNewDescriptor::BuildCallInterfaceDescriptorFunctionType( | 350 ArgumentsAccessNewDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 362 Isolate* isolate, int paramater_count) { | 351 Isolate* isolate, int paramater_count) { |
| 363 Zone* zone = isolate->interface_descriptor_zone(); | 352 Zone* zone = isolate->interface_descriptor_zone(); |
| 364 Type::FunctionType* function = | 353 FunctionType* function = |
| 365 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 354 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 366 function->InitParameter(0, AnyTagged(zone)); | 355 function->InitParameter(0, AnyTagged(zone)); |
| 367 function->InitParameter(1, SmiType(zone)); | 356 function->InitParameter(1, SmiType(zone)); |
| 368 function->InitParameter(2, ExternalPointer(zone)); | 357 function->InitParameter(2, ExternalPointer(zone)); |
| 369 return function; | 358 return function; |
| 370 } | 359 } |
| 371 | 360 |
| 372 | 361 |
| 373 void ArgumentsAccessNewDescriptor::InitializePlatformSpecific( | 362 void ArgumentsAccessNewDescriptor::InitializePlatformSpecific( |
| 374 CallInterfaceDescriptorData* data) { | 363 CallInterfaceDescriptorData* data) { |
| 375 Register registers[] = {function(), parameter_count(), parameter_pointer()}; | 364 Register registers[] = {function(), parameter_count(), parameter_pointer()}; |
| 376 data->InitializePlatformSpecific(arraysize(registers), registers); | 365 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 377 } | 366 } |
| 378 | 367 |
| 379 | 368 FunctionType* |
| 380 Type::FunctionType* | |
| 381 RestParamAccessDescriptor::BuildCallInterfaceDescriptorFunctionType( | 369 RestParamAccessDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 382 Isolate* isolate, int paramater_count) { | 370 Isolate* isolate, int paramater_count) { |
| 383 Zone* zone = isolate->interface_descriptor_zone(); | 371 Zone* zone = isolate->interface_descriptor_zone(); |
| 384 Type::FunctionType* function = | 372 FunctionType* function = |
| 385 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 373 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 386 function->InitParameter(0, SmiType(zone)); | 374 function->InitParameter(0, SmiType(zone)); |
| 387 function->InitParameter(1, ExternalPointer(zone)); | 375 function->InitParameter(1, ExternalPointer(zone)); |
| 388 function->InitParameter(2, SmiType(zone)); | 376 function->InitParameter(2, SmiType(zone)); |
| 389 return function; | 377 return function; |
| 390 } | 378 } |
| 391 | 379 |
| 392 | 380 |
| 393 void RestParamAccessDescriptor::InitializePlatformSpecific( | 381 void RestParamAccessDescriptor::InitializePlatformSpecific( |
| 394 CallInterfaceDescriptorData* data) { | 382 CallInterfaceDescriptorData* data) { |
| 395 Register registers[] = {parameter_count(), parameter_pointer(), | 383 Register registers[] = {parameter_count(), parameter_pointer(), |
| 396 rest_parameter_index()}; | 384 rest_parameter_index()}; |
| 397 data->InitializePlatformSpecific(arraysize(registers), registers); | 385 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 398 } | 386 } |
| 399 | 387 |
| 400 | 388 |
| 401 void ContextOnlyDescriptor::InitializePlatformSpecific( | 389 void ContextOnlyDescriptor::InitializePlatformSpecific( |
| 402 CallInterfaceDescriptorData* data) { | 390 CallInterfaceDescriptorData* data) { |
| 403 data->InitializePlatformSpecific(0, nullptr); | 391 data->InitializePlatformSpecific(0, nullptr); |
| 404 } | 392 } |
| 405 | 393 |
| 406 | 394 |
| 407 void GrowArrayElementsDescriptor::InitializePlatformSpecific( | 395 void GrowArrayElementsDescriptor::InitializePlatformSpecific( |
| 408 CallInterfaceDescriptorData* data) { | 396 CallInterfaceDescriptorData* data) { |
| 409 Register registers[] = {ObjectRegister(), KeyRegister()}; | 397 Register registers[] = {ObjectRegister(), KeyRegister()}; |
| 410 data->InitializePlatformSpecific(arraysize(registers), registers); | 398 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 411 } | 399 } |
| 412 | 400 |
| 413 | 401 FunctionType* |
| 414 Type::FunctionType* | |
| 415 FastCloneRegExpDescriptor::BuildCallInterfaceDescriptorFunctionType( | 402 FastCloneRegExpDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 416 Isolate* isolate, int paramater_count) { | 403 Isolate* isolate, int paramater_count) { |
| 417 Zone* zone = isolate->interface_descriptor_zone(); | 404 Zone* zone = isolate->interface_descriptor_zone(); |
| 418 Type::FunctionType* function = | 405 FunctionType* function = |
| 419 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 406 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 420 function->InitParameter(0, AnyTagged(zone)); // closure | 407 function->InitParameter(0, AnyTagged(zone)); // closure |
| 421 function->InitParameter(1, SmiType(zone)); // literal_index | 408 function->InitParameter(1, SmiType(zone)); // literal_index |
| 422 function->InitParameter(2, AnyTagged(zone)); // pattern | 409 function->InitParameter(2, AnyTagged(zone)); // pattern |
| 423 function->InitParameter(3, AnyTagged(zone)); // flags | 410 function->InitParameter(3, AnyTagged(zone)); // flags |
| 424 return function; | 411 return function; |
| 425 } | 412 } |
| 426 | 413 |
| 427 | 414 FunctionType* |
| 428 Type::FunctionType* | |
| 429 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType( | 415 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 430 Isolate* isolate, int paramater_count) { | 416 Isolate* isolate, int paramater_count) { |
| 431 Zone* zone = isolate->interface_descriptor_zone(); | 417 Zone* zone = isolate->interface_descriptor_zone(); |
| 432 Type::FunctionType* function = | 418 FunctionType* function = |
| 433 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 419 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 434 function->InitParameter(0, AnyTagged(zone)); | 420 function->InitParameter(0, AnyTagged(zone)); |
| 435 function->InitParameter(1, SmiType(zone)); | 421 function->InitParameter(1, SmiType(zone)); |
| 436 function->InitParameter(2, AnyTagged(zone)); | 422 function->InitParameter(2, AnyTagged(zone)); |
| 437 return function; | 423 return function; |
| 438 } | 424 } |
| 439 | 425 |
| 440 | 426 FunctionType* |
| 441 Type::FunctionType* | |
| 442 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType( | 427 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 443 Isolate* isolate, int paramater_count) { | 428 Isolate* isolate, int paramater_count) { |
| 444 Zone* zone = isolate->interface_descriptor_zone(); | 429 Zone* zone = isolate->interface_descriptor_zone(); |
| 445 Type::FunctionType* function = | 430 FunctionType* function = |
| 446 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 431 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 447 function->InitParameter(0, AnyTagged(zone)); | 432 function->InitParameter(0, AnyTagged(zone)); |
| 448 function->InitParameter(1, SmiType(zone)); | 433 function->InitParameter(1, SmiType(zone)); |
| 449 return function; | 434 return function; |
| 450 } | 435 } |
| 451 | 436 |
| 452 | 437 FunctionType* |
| 453 Type::FunctionType* | |
| 454 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType( | 438 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 455 Isolate* isolate, int paramater_count) { | 439 Isolate* isolate, int paramater_count) { |
| 456 Zone* zone = isolate->interface_descriptor_zone(); | 440 Zone* zone = isolate->interface_descriptor_zone(); |
| 457 Type::FunctionType* function = | 441 FunctionType* function = |
| 458 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 442 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 459 function->InitParameter(0, AnyTagged(zone)); | 443 function->InitParameter(0, AnyTagged(zone)); |
| 460 function->InitParameter(1, SmiType(zone)); | 444 function->InitParameter(1, SmiType(zone)); |
| 461 function->InitParameter(2, AnyTagged(zone)); | 445 function->InitParameter(2, AnyTagged(zone)); |
| 462 return function; | 446 return function; |
| 463 } | 447 } |
| 464 | 448 |
| 465 | 449 FunctionType* |
| 466 Type::FunctionType* | |
| 467 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( | 450 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 468 Isolate* isolate, int paramater_count) { | 451 Isolate* isolate, int paramater_count) { |
| 469 Zone* zone = isolate->interface_descriptor_zone(); | 452 Zone* zone = isolate->interface_descriptor_zone(); |
| 470 Type::FunctionType* function = | 453 FunctionType* function = |
| 471 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 454 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 472 function->InitParameter(0, AnyTagged(zone)); // target | 455 function->InitParameter(0, AnyTagged(zone)); // target |
| 473 function->InitParameter(1, UntaggedIntegral32(zone)); // actual #arguments | 456 function->InitParameter(1, UntaggedIntegral32(zone)); // actual #arguments |
| 474 return function; | 457 return function; |
| 475 } | 458 } |
| 476 | 459 |
| 477 | 460 FunctionType* ConstructStubDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 478 Type::FunctionType* | |
| 479 ConstructStubDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 480 Isolate* isolate, int paramater_count) { | 461 Isolate* isolate, int paramater_count) { |
| 481 Zone* zone = isolate->interface_descriptor_zone(); | 462 Zone* zone = isolate->interface_descriptor_zone(); |
| 482 Type::FunctionType* function = | 463 FunctionType* function = |
| 483 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 464 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 484 function->InitParameter(0, AnyTagged(zone)); // target | 465 function->InitParameter(0, AnyTagged(zone)); // target |
| 485 function->InitParameter(1, AnyTagged(zone)); // new.target | 466 function->InitParameter(1, AnyTagged(zone)); // new.target |
| 486 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments | 467 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments |
| 487 function->InitParameter(3, AnyTagged(zone)); // opt. allocation site | 468 function->InitParameter(3, AnyTagged(zone)); // opt. allocation site |
| 488 return function; | 469 return function; |
| 489 } | 470 } |
| 490 | 471 |
| 491 | 472 FunctionType* |
| 492 Type::FunctionType* | |
| 493 ConstructTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( | 473 ConstructTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 494 Isolate* isolate, int paramater_count) { | 474 Isolate* isolate, int paramater_count) { |
| 495 Zone* zone = isolate->interface_descriptor_zone(); | 475 Zone* zone = isolate->interface_descriptor_zone(); |
| 496 Type::FunctionType* function = | 476 FunctionType* function = |
| 497 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 477 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 498 function->InitParameter(0, AnyTagged(zone)); // target | 478 function->InitParameter(0, AnyTagged(zone)); // target |
| 499 function->InitParameter(1, AnyTagged(zone)); // new.target | 479 function->InitParameter(1, AnyTagged(zone)); // new.target |
| 500 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments | 480 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments |
| 501 return function; | 481 return function; |
| 502 } | 482 } |
| 503 | 483 |
| 504 | 484 FunctionType* |
| 505 Type::FunctionType* | |
| 506 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( | 485 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 507 Isolate* isolate, int paramater_count) { | 486 Isolate* isolate, int paramater_count) { |
| 508 Zone* zone = isolate->interface_descriptor_zone(); | 487 Zone* zone = isolate->interface_descriptor_zone(); |
| 509 Type::FunctionType* function = | 488 FunctionType* function = |
| 510 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 489 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 511 function->InitParameter(0, Type::Receiver()); // JSFunction | 490 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 512 function->InitParameter(1, SmiType(zone)); | 491 function->InitParameter(1, SmiType(zone)); |
| 513 return function; | 492 return function; |
| 514 } | 493 } |
| 515 | 494 |
| 516 | 495 FunctionType* CallFunctionWithFeedbackAndVectorDescriptor:: |
| 517 Type::FunctionType* CallFunctionWithFeedbackAndVectorDescriptor:: | |
| 518 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, | 496 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, |
| 519 int paramater_count) { | 497 int paramater_count) { |
| 520 Zone* zone = isolate->interface_descriptor_zone(); | 498 Zone* zone = isolate->interface_descriptor_zone(); |
| 521 Type::FunctionType* function = | 499 FunctionType* function = |
| 522 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 500 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 523 function->InitParameter(0, Type::Receiver()); // JSFunction | 501 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 524 function->InitParameter(1, SmiType(zone)); | 502 function->InitParameter(1, SmiType(zone)); |
| 525 function->InitParameter(2, AnyTagged(zone)); | 503 function->InitParameter(2, AnyTagged(zone)); |
| 526 return function; | 504 return function; |
| 527 } | 505 } |
| 528 | 506 |
| 529 | 507 FunctionType* |
| 530 Type::FunctionType* | |
| 531 ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 508 ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 532 Isolate* isolate, int paramater_count) { | 509 Isolate* isolate, int paramater_count) { |
| 533 Zone* zone = isolate->interface_descriptor_zone(); | 510 Zone* zone = isolate->interface_descriptor_zone(); |
| 534 Type::FunctionType* function = | 511 FunctionType* function = |
| 535 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 512 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 536 function->InitParameter(0, Type::Receiver()); // JSFunction | 513 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 537 function->InitParameter(1, AnyTagged(zone)); | 514 function->InitParameter(1, AnyTagged(zone)); |
| 538 function->InitParameter(2, UntaggedIntegral32(zone)); | 515 function->InitParameter(2, UntaggedIntegral32(zone)); |
| 539 return function; | 516 return function; |
| 540 } | 517 } |
| 541 | 518 |
| 542 | 519 FunctionType* |
| 543 Type::FunctionType* | |
| 544 InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 520 InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 545 Isolate* isolate, int paramater_count) { | 521 Isolate* isolate, int paramater_count) { |
| 546 Zone* zone = isolate->interface_descriptor_zone(); | 522 Zone* zone = isolate->interface_descriptor_zone(); |
| 547 Type::FunctionType* function = | 523 FunctionType* function = |
| 548 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 524 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 549 function->InitParameter(0, Type::Receiver()); // JSFunction | 525 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 550 function->InitParameter(1, UntaggedIntegral32(zone)); | 526 function->InitParameter(1, UntaggedIntegral32(zone)); |
| 551 return function; | 527 return function; |
| 552 } | 528 } |
| 553 | 529 |
| 554 | 530 FunctionType* |
| 555 Type::FunctionType* | |
| 556 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 531 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 557 Isolate* isolate, int paramater_count) { | 532 Isolate* isolate, int paramater_count) { |
| 558 Zone* zone = isolate->interface_descriptor_zone(); | 533 Zone* zone = isolate->interface_descriptor_zone(); |
| 559 Type::FunctionType* function = | 534 FunctionType* function = |
| 560 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 535 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 561 function->InitParameter(0, Type::Receiver()); // JSFunction | 536 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 562 function->InitParameter(1, AnyTagged(zone)); // the new target | 537 function->InitParameter(1, AnyTagged(zone)); // the new target |
| 563 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments | 538 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments |
| 564 function->InitParameter(3, UntaggedIntegral32(zone)); // expected #arguments | 539 function->InitParameter(3, UntaggedIntegral32(zone)); // expected #arguments |
| 565 return function; | 540 return function; |
| 566 } | 541 } |
| 567 | 542 |
| 568 | 543 FunctionType* ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 569 Type::FunctionType* | |
| 570 ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 571 Isolate* isolate, int paramater_count) { | 544 Isolate* isolate, int paramater_count) { |
| 572 Zone* zone = isolate->interface_descriptor_zone(); | 545 Zone* zone = isolate->interface_descriptor_zone(); |
| 573 Type::FunctionType* function = | 546 FunctionType* function = |
| 574 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 547 Type::Function(AnyTagged(zone), Type::Undefined(), 5, zone)->AsFunction(); |
| 575 function->InitParameter(0, AnyTagged(zone)); // callee | 548 function->InitParameter(0, AnyTagged(zone)); // callee |
| 576 function->InitParameter(1, AnyTagged(zone)); // call_data | 549 function->InitParameter(1, AnyTagged(zone)); // call_data |
| 577 function->InitParameter(2, AnyTagged(zone)); // holder | 550 function->InitParameter(2, AnyTagged(zone)); // holder |
| 578 function->InitParameter(3, ExternalPointer(zone)); // api_function_address | 551 function->InitParameter(3, ExternalPointer(zone)); // api_function_address |
| 579 function->InitParameter(4, UntaggedIntegral32(zone)); // actual #arguments | 552 function->InitParameter(4, UntaggedIntegral32(zone)); // actual #arguments |
| 580 return function; | 553 return function; |
| 581 } | 554 } |
| 582 | 555 |
| 583 | 556 FunctionType* ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 584 Type::FunctionType* | |
| 585 ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 586 Isolate* isolate, int paramater_count) { | 557 Isolate* isolate, int paramater_count) { |
| 587 Zone* zone = isolate->interface_descriptor_zone(); | 558 Zone* zone = isolate->interface_descriptor_zone(); |
| 588 Type::FunctionType* function = | 559 FunctionType* function = |
| 589 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 560 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 590 function->InitParameter(0, AnyTagged(zone)); // callee | 561 function->InitParameter(0, AnyTagged(zone)); // callee |
| 591 function->InitParameter(1, AnyTagged(zone)); // call_data | 562 function->InitParameter(1, AnyTagged(zone)); // call_data |
| 592 function->InitParameter(2, AnyTagged(zone)); // holder | 563 function->InitParameter(2, AnyTagged(zone)); // holder |
| 593 function->InitParameter(3, ExternalPointer(zone)); // api_function_address | 564 function->InitParameter(3, ExternalPointer(zone)); // api_function_address |
| 594 return function; | 565 return function; |
| 595 } | 566 } |
| 596 | 567 |
| 597 | 568 |
| 598 } // namespace internal | 569 } // namespace internal |
| 599 } // namespace v8 | 570 } // namespace v8 |
| OLD | NEW |