| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void LoadDescriptor::InitializePlatformSpecific( | 94 void LoadDescriptor::InitializePlatformSpecific( |
| 95 CallInterfaceDescriptorData* data) { | 95 CallInterfaceDescriptorData* data) { |
| 96 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; | 96 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; |
| 97 data->InitializePlatformSpecific(arraysize(registers), registers); | 97 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 98 } | 98 } |
| 99 | 99 |
| 100 FunctionType* LoadGlobalDescriptor::BuildCallInterfaceDescriptorFunctionType( | 100 FunctionType* LoadGlobalDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 101 Isolate* isolate, int paramater_count) { | 101 Isolate* isolate, int paramater_count) { |
| 102 Zone* zone = isolate->interface_descriptor_zone(); | 102 Zone* zone = isolate->interface_descriptor_zone(); |
| 103 FunctionType* function = | 103 FunctionType* function = |
| 104 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 105 function->InitParameter(0, AnyTagged(zone)); |
| 106 function->InitParameter(1, SmiType(zone)); |
| 107 return function; |
| 108 } |
| 109 |
| 110 void LoadGlobalDescriptor::InitializePlatformSpecific( |
| 111 CallInterfaceDescriptorData* data) { |
| 112 Register registers[] = {LoadWithVectorDescriptor::NameRegister(), |
| 113 LoadWithVectorDescriptor::SlotRegister()}; |
| 114 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 115 } |
| 116 |
| 117 FunctionType* |
| 118 LoadGlobalWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 119 Isolate* isolate, int paramater_count) { |
| 120 Zone* zone = isolate->interface_descriptor_zone(); |
| 121 FunctionType* function = |
| 104 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); | 122 Type::Function(AnyTagged(zone), Type::Undefined(), 3, zone)->AsFunction(); |
| 105 function->InitParameter(0, AnyTagged(zone)); | 123 function->InitParameter(0, AnyTagged(zone)); |
| 106 function->InitParameter(1, SmiType(zone)); | 124 function->InitParameter(1, SmiType(zone)); |
| 107 function->InitParameter(2, AnyTagged(zone)); | 125 function->InitParameter(2, AnyTagged(zone)); |
| 108 return function; | 126 return function; |
| 109 } | 127 } |
| 110 | 128 |
| 111 void LoadGlobalDescriptor::InitializePlatformSpecific( | 129 void LoadGlobalWithVectorDescriptor::InitializePlatformSpecific( |
| 112 CallInterfaceDescriptorData* data) { | 130 CallInterfaceDescriptorData* data) { |
| 113 Register registers[] = {LoadWithVectorDescriptor::NameRegister(), | 131 Register registers[] = {LoadWithVectorDescriptor::NameRegister(), |
| 114 LoadWithVectorDescriptor::SlotRegister(), | 132 LoadWithVectorDescriptor::SlotRegister(), |
| 115 LoadWithVectorDescriptor::VectorRegister()}; | 133 LoadWithVectorDescriptor::VectorRegister()}; |
| 116 data->InitializePlatformSpecific(arraysize(registers), registers); | 134 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 117 } | 135 } |
| 118 | 136 |
| 119 void StoreDescriptor::InitializePlatformSpecific( | 137 void StoreDescriptor::InitializePlatformSpecific( |
| 120 CallInterfaceDescriptorData* data) { | 138 CallInterfaceDescriptorData* data) { |
| 121 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; | 139 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 FunctionType* function = | 171 FunctionType* function = |
| 154 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); | 172 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 155 function->InitParameter(0, AnyTagged(zone)); // Receiver | 173 function->InitParameter(0, AnyTagged(zone)); // Receiver |
| 156 function->InitParameter(1, AnyTagged(zone)); // Name | 174 function->InitParameter(1, AnyTagged(zone)); // Name |
| 157 function->InitParameter(2, AnyTagged(zone)); // Value | 175 function->InitParameter(2, AnyTagged(zone)); // Value |
| 158 function->InitParameter(3, AnyTagged(zone)); // Map | 176 function->InitParameter(3, AnyTagged(zone)); // Map |
| 159 return function; | 177 return function; |
| 160 } | 178 } |
| 161 | 179 |
| 162 FunctionType* | 180 FunctionType* |
| 163 LoadGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( | |
| 164 Isolate* isolate, int paramater_count) { | |
| 165 Zone* zone = isolate->interface_descriptor_zone(); | |
| 166 FunctionType* function = | |
| 167 Type::Function(AnyTagged(zone), Type::Undefined(), 1, zone)->AsFunction(); | |
| 168 function->InitParameter(0, UntaggedIntegral32(zone)); | |
| 169 return function; | |
| 170 } | |
| 171 | |
| 172 | |
| 173 void LoadGlobalViaContextDescriptor::InitializePlatformSpecific( | |
| 174 CallInterfaceDescriptorData* data) { | |
| 175 Register registers[] = {SlotRegister()}; | |
| 176 data->InitializePlatformSpecific(arraysize(registers), registers); | |
| 177 } | |
| 178 | |
| 179 FunctionType* | |
| 180 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( | 181 StoreGlobalViaContextDescriptor::BuildCallInterfaceDescriptorFunctionType( |
| 181 Isolate* isolate, int paramater_count) { | 182 Isolate* isolate, int paramater_count) { |
| 182 Zone* zone = isolate->interface_descriptor_zone(); | 183 Zone* zone = isolate->interface_descriptor_zone(); |
| 183 FunctionType* function = | 184 FunctionType* function = |
| 184 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); | 185 Type::Function(AnyTagged(zone), Type::Undefined(), 2, zone)->AsFunction(); |
| 185 function->InitParameter(0, UntaggedIntegral32(zone)); | 186 function->InitParameter(0, UntaggedIntegral32(zone)); |
| 186 function->InitParameter(1, AnyTagged(zone)); | 187 function->InitParameter(1, AnyTagged(zone)); |
| 187 return function; | 188 return function; |
| 188 } | 189 } |
| 189 | 190 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); | 546 Type::Function(AnyTagged(zone), Type::Undefined(), 4, zone)->AsFunction(); |
| 546 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); | 547 function->InitParameter(kAccumulatorParameter, AnyTagged(zone)); |
| 547 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); | 548 function->InitParameter(kBytecodeOffsetParameter, UntaggedIntegral32(zone)); |
| 548 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); | 549 function->InitParameter(kBytecodeArrayParameter, AnyTagged(zone)); |
| 549 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); | 550 function->InitParameter(kDispatchTableParameter, AnyTagged(zone)); |
| 550 return function; | 551 return function; |
| 551 } | 552 } |
| 552 | 553 |
| 553 } // namespace internal | 554 } // namespace internal |
| 554 } // namespace v8 | 555 } // namespace v8 |
| OLD | NEW |