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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
| 7 #include "src/ic/ic-conventions.h" |
7 #include "src/interface-descriptors.h" | 8 #include "src/interface-descriptors.h" |
8 | 9 |
9 namespace v8 { | 10 namespace v8 { |
10 namespace internal { | 11 namespace internal { |
11 | 12 |
12 InterfaceDescriptor::InterfaceDescriptor() : register_param_count_(-1) {} | 13 InterfaceDescriptor::InterfaceDescriptor() : register_param_count_(-1) {} |
13 | 14 |
14 | 15 |
15 void InterfaceDescriptor::Initialize( | 16 void InterfaceDescriptor::Initialize( |
16 int register_parameter_count, Register* registers, | 17 int register_parameter_count, Register* registers, |
(...skipping 27 matching lines...) Expand all Loading... |
44 } | 45 } |
45 | 46 |
46 | 47 |
47 void CallInterfaceDescriptor::Initialize( | 48 void CallInterfaceDescriptor::Initialize( |
48 int register_parameter_count, Register* registers, | 49 int register_parameter_count, Register* registers, |
49 Representation* param_representations, | 50 Representation* param_representations, |
50 PlatformInterfaceDescriptor* platform_descriptor) { | 51 PlatformInterfaceDescriptor* platform_descriptor) { |
51 InterfaceDescriptor::Initialize(register_parameter_count, registers, | 52 InterfaceDescriptor::Initialize(register_parameter_count, registers, |
52 param_representations, platform_descriptor); | 53 param_representations, platform_descriptor); |
53 } | 54 } |
| 55 |
| 56 |
| 57 void CallDescriptors::InitializeForIsolateAllPlatforms(Isolate* isolate) { |
| 58 { |
| 59 CallInterfaceDescriptor* descriptor = |
| 60 isolate->call_descriptor(CallDescriptorKey::LoadICCall); |
| 61 Register registers[] = {InterfaceDescriptor::ContextRegister(), |
| 62 LoadConvention::ReceiverRegister(), |
| 63 LoadConvention::NameRegister()}; |
| 64 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 65 } |
| 66 { |
| 67 CallInterfaceDescriptor* descriptor = |
| 68 isolate->call_descriptor(CallDescriptorKey::StoreICCall); |
| 69 Register registers[] = {InterfaceDescriptor::ContextRegister(), |
| 70 StoreConvention::ReceiverRegister(), |
| 71 StoreConvention::NameRegister(), |
| 72 StoreConvention::ValueRegister()}; |
| 73 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 74 } |
| 75 { |
| 76 CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
| 77 CallDescriptorKey::ElementTransitionAndStoreCall); |
| 78 Register registers[] = { |
| 79 InterfaceDescriptor::ContextRegister(), |
| 80 StoreConvention::ValueRegister(), StoreConvention::MapRegister(), |
| 81 StoreConvention::NameRegister(), StoreConvention::ReceiverRegister()}; |
| 82 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 83 } |
| 84 { |
| 85 CallInterfaceDescriptor* descriptor = |
| 86 isolate->call_descriptor(CallDescriptorKey::InstanceofCall); |
| 87 Register registers[] = {InterfaceDescriptor::ContextRegister(), |
| 88 InstanceofConvention::left(), |
| 89 InstanceofConvention::right()}; |
| 90 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 91 } |
| 92 { |
| 93 CallInterfaceDescriptor* descriptor = |
| 94 isolate->call_descriptor(CallDescriptorKey::VectorLoadICCall); |
| 95 Register registers[] = {InterfaceDescriptor::ContextRegister(), |
| 96 FullVectorLoadConvention::ReceiverRegister(), |
| 97 FullVectorLoadConvention::NameRegister(), |
| 98 FullVectorLoadConvention::SlotRegister(), |
| 99 FullVectorLoadConvention::VectorRegister()}; |
| 100 descriptor->Initialize(arraysize(registers), registers, NULL); |
| 101 } |
| 102 } |
54 } | 103 } |
55 } // namespace v8::internal | 104 } // namespace v8::internal |
OLD | NEW |