| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 Register registers[] = {ArgumentRegister()}; | 207 Register registers[] = {ArgumentRegister()}; |
| 208 data->InitializePlatformSpecific(arraysize(registers), registers); | 208 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void MathPowTaggedDescriptor::InitializePlatformSpecific( | 211 void MathPowTaggedDescriptor::InitializePlatformSpecific( |
| 212 CallInterfaceDescriptorData* data) { | 212 CallInterfaceDescriptorData* data) { |
| 213 Register registers[] = {exponent()}; | 213 Register registers[] = {exponent()}; |
| 214 data->InitializePlatformSpecific(arraysize(registers), registers); | 214 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 215 } | 215 } |
| 216 | 216 |
| 217 | |
| 218 void MathPowIntegerDescriptor::InitializePlatformSpecific( | 217 void MathPowIntegerDescriptor::InitializePlatformSpecific( |
| 219 CallInterfaceDescriptorData* data) { | 218 CallInterfaceDescriptorData* data) { |
| 220 Register registers[] = {exponent()}; | 219 Register registers[] = {exponent()}; |
| 221 data->InitializePlatformSpecific(arraysize(registers), registers); | 220 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 222 } | 221 } |
| 223 | 222 |
| 224 FunctionType* | 223 FunctionType* |
| 225 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 224 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 226 Isolate* isolate, int paramater_count) { | 225 Isolate* isolate, int paramater_count) { |
| 227 Zone* zone = isolate->interface_descriptor_zone(); | 226 Zone* zone = isolate->interface_descriptor_zone(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 Register registers[] = {ReceiverRegister(), HolderRegister(), | 313 Register registers[] = {ReceiverRegister(), HolderRegister(), |
| 315 CallbackRegister()}; | 314 CallbackRegister()}; |
| 316 data->InitializePlatformSpecific(arraysize(registers), registers); | 315 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 317 } | 316 } |
| 318 | 317 |
| 319 void ContextOnlyDescriptor::InitializePlatformSpecific( | 318 void ContextOnlyDescriptor::InitializePlatformSpecific( |
| 320 CallInterfaceDescriptorData* data) { | 319 CallInterfaceDescriptorData* data) { |
| 321 data->InitializePlatformSpecific(0, nullptr); | 320 data->InitializePlatformSpecific(0, nullptr); |
| 322 } | 321 } |
| 323 | 322 |
| 323 CallInterfaceDescriptor OnStackArgsDescriptorBase::ForArgs( |
| 324 Isolate* isolate, int parameter_count) { |
| 325 switch (parameter_count) { |
| 326 case 1: |
| 327 return OnStackWith1ArgsDescriptor(isolate); |
| 328 case 2: |
| 329 return OnStackWith2ArgsDescriptor(isolate); |
| 330 case 3: |
| 331 return OnStackWith3ArgsDescriptor(isolate); |
| 332 case 4: |
| 333 return OnStackWith4ArgsDescriptor(isolate); |
| 334 case 5: |
| 335 return OnStackWith5ArgsDescriptor(isolate); |
| 336 case 6: |
| 337 return OnStackWith6ArgsDescriptor(isolate); |
| 338 case 7: |
| 339 return OnStackWith7ArgsDescriptor(isolate); |
| 340 default: |
| 341 UNREACHABLE(); |
| 342 return VoidDescriptor(isolate); |
| 343 } |
| 344 } |
| 345 |
| 346 FunctionType* |
| 347 OnStackArgsDescriptorBase::BuildCallInterfaceDescriptorFunctionTypeWithArg( |
| 348 Isolate* isolate, int register_parameter_count, int parameter_count) { |
| 349 DCHECK_EQ(0, register_parameter_count); |
| 350 DCHECK_GT(parameter_count, 0); |
| 351 Zone* zone = isolate->interface_descriptor_zone(); |
| 352 FunctionType* function = |
| 353 Type::Function(AnyTagged(zone), AnyTagged(zone), parameter_count, zone) |
| 354 ->AsFunction(); |
| 355 for (int i = 0; i < parameter_count; i++) { |
| 356 function->InitParameter(i, AnyTagged(zone)); |
| 357 } |
| 358 return function; |
| 359 } |
| 360 |
| 361 void OnStackArgsDescriptorBase::InitializePlatformSpecific( |
| 362 CallInterfaceDescriptorData* data) { |
| 363 data->InitializePlatformSpecific(0, nullptr); |
| 364 } |
| 324 | 365 |
| 325 void GrowArrayElementsDescriptor::InitializePlatformSpecific( | 366 void GrowArrayElementsDescriptor::InitializePlatformSpecific( |
| 326 CallInterfaceDescriptorData* data) { | 367 CallInterfaceDescriptorData* data) { |
| 327 Register registers[] = {ObjectRegister(), KeyRegister()}; | 368 Register registers[] = {ObjectRegister(), KeyRegister()}; |
| 328 data->InitializePlatformSpecific(arraysize(registers), registers); | 369 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 329 } | 370 } |
| 330 | 371 |
| 331 FunctionType* | 372 FunctionType* |
| 332 VarArgFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 373 VarArgFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 333 Isolate* isolate, int paramater_count) { | 374 Isolate* isolate, int paramater_count) { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); | 587 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 547 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); | 588 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); |
| 548 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); | 589 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); |
| 549 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); | 590 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); |
| 550 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); | 591 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); |
| 551 return function; | 592 return function; |
| 552 } | 593 } |
| 553 | 594 |
| 554 } // namespace internal | 595 } // namespace internal |
| 555 } // namespace v8 | 596 } // namespace v8 |
| OLD | NEW |