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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return function; | 43 return function; |
44 } | 44 } |
45 | 45 |
46 void CallInterfaceDescriptorData::InitializePlatformSpecific( | 46 void CallInterfaceDescriptorData::InitializePlatformSpecific( |
47 int register_parameter_count, const Register* registers, | 47 int register_parameter_count, const Register* registers, |
48 PlatformInterfaceDescriptor* platform_descriptor) { | 48 PlatformInterfaceDescriptor* platform_descriptor) { |
49 platform_specific_descriptor_ = platform_descriptor; | 49 platform_specific_descriptor_ = platform_descriptor; |
50 register_param_count_ = register_parameter_count; | 50 register_param_count_ = register_parameter_count; |
51 | 51 |
52 // InterfaceDescriptor owns a copy of the registers array. | 52 // InterfaceDescriptor owns a copy of the registers array. |
53 register_params_.Reset(NewArray<Register>(register_parameter_count)); | 53 register_params_.reset(NewArray<Register>(register_parameter_count)); |
54 for (int i = 0; i < register_parameter_count; i++) { | 54 for (int i = 0; i < register_parameter_count; i++) { |
55 register_params_[i] = registers[i]; | 55 register_params_[i] = registers[i]; |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const { | 59 const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const { |
60 CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0); | 60 CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0); |
61 size_t index = data_ - start; | 61 size_t index = data_ - start; |
62 DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS); | 62 DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS); |
63 CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index); | 63 CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); | 575 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
576 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); | 576 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); |
577 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); | 577 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); |
578 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); | 578 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); |
579 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); | 579 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); |
580 return function; | 580 return function; |
581 } | 581 } |
582 | 582 |
583 } // namespace internal | 583 } // namespace internal |
584 } // namespace v8 | 584 } // namespace v8 |
OLD | NEW |