| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 return function; | 413 return function; |
| 414 } | 414 } |
| 415 | 415 |
| 416 | 416 |
| 417 Type::FunctionType* | 417 Type::FunctionType* |
| 418 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( | 418 CallTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 419 Isolate* isolate, int paramater_count) { | 419 Isolate* isolate, int paramater_count) { |
| 420 Zone* zone = isolate->interface_descriptor_zone(); | 420 Zone* zone = isolate->interface_descriptor_zone(); |
| 421 Type::FunctionType* function = | 421 Type::FunctionType* function = |
| 422 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 422 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); |
| 423 function->InitParameter(0, AnyTagged(zone)); // target | 423 function->InitParameter(0, AnyTagged(zone)); // target |
| 424 function->InitParameter( | 424 function->InitParameter(1, UntaggedIntegral32(zone)); // actual #arguments |
| 425 1, UntaggedIntegral32(zone)); // actual number of arguments | |
| 426 return function; | 425 return function; |
| 427 } | 426 } |
| 428 | 427 |
| 429 | 428 |
| 430 Type::FunctionType* | 429 Type::FunctionType* |
| 431 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( | 430 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 432 Isolate* isolate, int paramater_count) { | 431 Isolate* isolate, int paramater_count) { |
| 433 Zone* zone = isolate->interface_descriptor_zone(); | 432 Zone* zone = isolate->interface_descriptor_zone(); |
| 434 Type::FunctionType* function = | 433 Type::FunctionType* function = |
| 435 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); | 434 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 2, zone); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 function->InitParameter(1, UntaggedIntegral32(zone)); | 474 function->InitParameter(1, UntaggedIntegral32(zone)); |
| 476 return function; | 475 return function; |
| 477 } | 476 } |
| 478 | 477 |
| 479 | 478 |
| 480 Type::FunctionType* | 479 Type::FunctionType* |
| 481 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 480 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 482 Isolate* isolate, int paramater_count) { | 481 Isolate* isolate, int paramater_count) { |
| 483 Zone* zone = isolate->interface_descriptor_zone(); | 482 Zone* zone = isolate->interface_descriptor_zone(); |
| 484 Type::FunctionType* function = | 483 Type::FunctionType* function = |
| 485 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 484 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); |
| 486 function->InitParameter(0, Type::Receiver()); // JSFunction | 485 function->InitParameter(0, Type::Receiver()); // JSFunction |
| 487 function->InitParameter( | 486 function->InitParameter(1, AnyTagged(zone)); // the new target |
| 488 1, UntaggedIntegral32(zone)); // actual number of arguments | 487 function->InitParameter(2, UntaggedIntegral32(zone)); // actual #arguments |
| 489 function->InitParameter( | 488 function->InitParameter(3, UntaggedIntegral32(zone)); // expected #arguments |
| 490 2, | |
| 491 UntaggedIntegral32(zone)); // expected number of arguments | |
| 492 return function; | 489 return function; |
| 493 } | 490 } |
| 494 | 491 |
| 495 | 492 |
| 496 Type::FunctionType* | 493 Type::FunctionType* |
| 497 ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 494 ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 498 Isolate* isolate, int paramater_count) { | 495 Isolate* isolate, int paramater_count) { |
| 499 Zone* zone = isolate->interface_descriptor_zone(); | 496 Zone* zone = isolate->interface_descriptor_zone(); |
| 500 Type::FunctionType* function = | 497 Type::FunctionType* function = |
| 501 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 498 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); |
| 502 function->InitParameter(0, AnyTagged(zone)); // callee | 499 function->InitParameter(0, AnyTagged(zone)); // callee |
| 503 function->InitParameter(1, AnyTagged(zone)); // call_data | 500 function->InitParameter(1, AnyTagged(zone)); // call_data |
| 504 function->InitParameter(2, AnyTagged(zone)); // holder | 501 function->InitParameter(2, AnyTagged(zone)); // holder |
| 505 function->InitParameter(3, ExternalPointer(zone)); // api_function_address | 502 function->InitParameter(3, ExternalPointer(zone)); // api_function_address |
| 506 function->InitParameter( | 503 function->InitParameter(4, UntaggedIntegral32(zone)); // actual #arguments |
| 507 4, UntaggedIntegral32(zone)); // actual number of arguments | |
| 508 return function; | 504 return function; |
| 509 } | 505 } |
| 510 | 506 |
| 511 | 507 |
| 512 Type::FunctionType* | 508 Type::FunctionType* |
| 513 ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 509 ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 514 Isolate* isolate, int paramater_count) { | 510 Isolate* isolate, int paramater_count) { |
| 515 Zone* zone = isolate->interface_descriptor_zone(); | 511 Zone* zone = isolate->interface_descriptor_zone(); |
| 516 Type::FunctionType* function = | 512 Type::FunctionType* function = |
| 517 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 513 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 545 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 541 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); |
| 546 function->InitParameter(0, Type::Receiver()); | 542 function->InitParameter(0, Type::Receiver()); |
| 547 function->InitParameter(1, SmiType(zone)); | 543 function->InitParameter(1, SmiType(zone)); |
| 548 function->InitParameter(2, AnyTagged(zone)); | 544 function->InitParameter(2, AnyTagged(zone)); |
| 549 function->InitParameter(3, AnyTagged(zone)); | 545 function->InitParameter(3, AnyTagged(zone)); |
| 550 function->InitParameter(4, AnyTagged(zone)); | 546 function->InitParameter(4, AnyTagged(zone)); |
| 551 return function; | 547 return function; |
| 552 } | 548 } |
| 553 } // namespace internal | 549 } // namespace internal |
| 554 } // namespace v8 | 550 } // namespace v8 |
| OLD | NEW |