| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 return ""; | 74 return ""; |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 void AllocateMutableHeapNumberDescriptor::InitializePlatformSpecific( | 78 void AllocateMutableHeapNumberDescriptor::InitializePlatformSpecific( |
| 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( |
| 85 CallInterfaceDescriptorData* data) { |
| 86 data->InitializePlatformSpecific(0, nullptr); |
| 87 } |
| 88 |
| 89 |
| 84 Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( | 90 Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 85 Isolate* isolate, int paramater_count) { | 91 Isolate* isolate, int paramater_count) { |
| 86 Zone* zone = isolate->interface_descriptor_zone(); | 92 Zone* zone = isolate->interface_descriptor_zone(); |
| 87 Type::FunctionType* function = | 93 Type::FunctionType* function = |
| 88 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); | 94 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 3, zone); |
| 89 function->InitParameter(0, AnyTagged(zone)); | 95 function->InitParameter(0, AnyTagged(zone)); |
| 90 function->InitParameter(1, AnyTagged(zone)); | 96 function->InitParameter(1, AnyTagged(zone)); |
| 91 function->InitParameter(2, SmiType(zone)); | 97 function->InitParameter(2, SmiType(zone)); |
| 92 return function; | 98 return function; |
| 93 } | 99 } |
| 94 | 100 |
| 101 |
| 95 void LoadDescriptor::InitializePlatformSpecific( | 102 void LoadDescriptor::InitializePlatformSpecific( |
| 96 CallInterfaceDescriptorData* data) { | 103 CallInterfaceDescriptorData* data) { |
| 97 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; | 104 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; |
| 98 data->InitializePlatformSpecific(arraysize(registers), registers); | 105 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 99 } | 106 } |
| 100 | 107 |
| 101 | 108 |
| 102 void StoreDescriptor::InitializePlatformSpecific( | 109 void StoreDescriptor::InitializePlatformSpecific( |
| 103 CallInterfaceDescriptorData* data) { | 110 CallInterfaceDescriptorData* data) { |
| 104 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; | 111 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 Type::FunctionType* function = | 546 Type::FunctionType* function = |
| 540 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 547 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); |
| 541 function->InitParameter(0, AnyTagged(zone)); // callee | 548 function->InitParameter(0, AnyTagged(zone)); // callee |
| 542 function->InitParameter(1, AnyTagged(zone)); // call_data | 549 function->InitParameter(1, AnyTagged(zone)); // call_data |
| 543 function->InitParameter(2, AnyTagged(zone)); // holder | 550 function->InitParameter(2, AnyTagged(zone)); // holder |
| 544 function->InitParameter(3, ExternalPointer(zone)); // api_function_address | 551 function->InitParameter(3, ExternalPointer(zone)); // api_function_address |
| 545 return function; | 552 return function; |
| 546 } | 553 } |
| 547 | 554 |
| 548 | 555 |
| 549 Type::FunctionType* MathRoundVariantCallFromUnoptimizedCodeDescriptor:: | |
| 550 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, | |
| 551 int paramater_count) { | |
| 552 Zone* zone = isolate->interface_descriptor_zone(); | |
| 553 Type::FunctionType* function = | |
| 554 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | |
| 555 function->InitParameter(0, Type::Receiver()); | |
| 556 function->InitParameter(1, SmiType(zone)); | |
| 557 function->InitParameter(2, AnyTagged(zone)); | |
| 558 function->InitParameter(3, AnyTagged(zone)); | |
| 559 return function; | |
| 560 } | |
| 561 | |
| 562 | |
| 563 Type::FunctionType* MathRoundVariantCallFromOptimizedCodeDescriptor:: | |
| 564 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, | |
| 565 int paramater_count) { | |
| 566 Zone* zone = isolate->interface_descriptor_zone(); | |
| 567 Type::FunctionType* function = | |
| 568 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | |
| 569 function->InitParameter(0, Type::Receiver()); | |
| 570 function->InitParameter(1, SmiType(zone)); | |
| 571 function->InitParameter(2, AnyTagged(zone)); | |
| 572 function->InitParameter(3, AnyTagged(zone)); | |
| 573 function->InitParameter(4, AnyTagged(zone)); | |
| 574 return function; | |
| 575 } | |
| 576 } // namespace internal | 556 } // namespace internal |
| 577 } // namespace v8 | 557 } // namespace v8 |
| OLD | NEW |