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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 void StoreTransitionDescriptor::InitializePlatformSpecific( | 103 void StoreTransitionDescriptor::InitializePlatformSpecific( |
104 CallInterfaceDescriptorData* data) { | 104 CallInterfaceDescriptorData* data) { |
105 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), | 105 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
106 MapRegister()}; | 106 MapRegister()}; |
107 | 107 |
108 data->InitializePlatformSpecific(arraysize(registers), registers); | 108 data->InitializePlatformSpecific(arraysize(registers), registers); |
109 } | 109 } |
110 | 110 |
111 | 111 |
| 112 void VectorStoreTransitionDescriptor::InitializePlatformSpecific( |
| 113 CallInterfaceDescriptorData* data) { |
| 114 if (SlotRegister().is(no_reg)) { |
| 115 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
| 116 MapRegister(), VectorRegister()}; |
| 117 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 118 } else { |
| 119 Register registers[] = {ReceiverRegister(), NameRegister(), |
| 120 ValueRegister(), MapRegister(), |
| 121 SlotRegister(), VectorRegister()}; |
| 122 data->InitializePlatformSpecific(arraysize(registers), registers); |
| 123 } |
| 124 } |
| 125 |
| 126 |
112 Type::FunctionType* | 127 Type::FunctionType* |
113 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 128 StoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
114 Isolate* isolate, int paramater_count) { | 129 Isolate* isolate, int paramater_count) { |
115 Zone* zone = isolate->interface_descriptor_zone(); | 130 Zone* zone = isolate->interface_descriptor_zone(); |
116 Type::FunctionType* function = | 131 Type::FunctionType* function = |
117 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); | 132 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 4, zone); |
118 function->InitParameter(0, AnyTagged(zone)); // Receiver | 133 function->InitParameter(0, AnyTagged(zone)); // Receiver |
119 function->InitParameter(1, AnyTagged(zone)); // Name | 134 function->InitParameter(1, AnyTagged(zone)); // Name |
120 function->InitParameter(2, AnyTagged(zone)); // Value | 135 function->InitParameter(2, AnyTagged(zone)); // Value |
121 function->InitParameter(3, AnyTagged(zone)); // Map | 136 function->InitParameter(3, AnyTagged(zone)); // Map |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), | 236 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), |
222 VectorRegister()}; | 237 VectorRegister()}; |
223 data->InitializePlatformSpecific(arraysize(registers), registers); | 238 data->InitializePlatformSpecific(arraysize(registers), registers); |
224 } | 239 } |
225 | 240 |
226 | 241 |
227 Type::FunctionType* | 242 Type::FunctionType* |
228 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 243 VectorStoreTransitionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
229 Isolate* isolate, int paramater_count) { | 244 Isolate* isolate, int paramater_count) { |
230 Zone* zone = isolate->interface_descriptor_zone(); | 245 Zone* zone = isolate->interface_descriptor_zone(); |
231 Type::FunctionType* function = | 246 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg); |
232 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 6, zone); | 247 int arg_count = has_slot ? 6 : 5; |
233 function->InitParameter(0, AnyTagged(zone)); // receiver | 248 Type::FunctionType* function = Type::FunctionType::New( |
234 function->InitParameter(1, AnyTagged(zone)); // name | 249 AnyTagged(zone), Type::Undefined(), arg_count, zone); |
235 function->InitParameter(2, AnyTagged(zone)); // value | 250 int index = 0; |
236 function->InitParameter(3, SmiType(zone)); // slot | 251 function->InitParameter(index++, AnyTagged(zone)); // receiver |
237 function->InitParameter(4, AnyTagged(zone)); // vector | 252 function->InitParameter(index++, AnyTagged(zone)); // name |
238 function->InitParameter(5, AnyTagged(zone)); // map | 253 function->InitParameter(index++, AnyTagged(zone)); // value |
| 254 function->InitParameter(index++, AnyTagged(zone)); // map |
| 255 if (has_slot) { |
| 256 function->InitParameter(index++, SmiType(zone)); // slot |
| 257 } |
| 258 function->InitParameter(index++, AnyTagged(zone)); // vector |
239 return function; | 259 return function; |
240 } | 260 } |
241 | 261 |
242 | 262 |
243 Type::FunctionType* | 263 Type::FunctionType* |
244 VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( | 264 VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( |
245 Isolate* isolate, int paramater_count) { | 265 Isolate* isolate, int paramater_count) { |
246 Zone* zone = isolate->interface_descriptor_zone(); | 266 Zone* zone = isolate->interface_descriptor_zone(); |
247 Type::FunctionType* function = | 267 Type::FunctionType* function = |
248 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 268 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); | 532 Type::FunctionType::New(AnyTagged(zone), Type::Undefined(), 5, zone); |
513 function->InitParameter(0, Type::Receiver()); | 533 function->InitParameter(0, Type::Receiver()); |
514 function->InitParameter(1, SmiType(zone)); | 534 function->InitParameter(1, SmiType(zone)); |
515 function->InitParameter(2, AnyTagged(zone)); | 535 function->InitParameter(2, AnyTagged(zone)); |
516 function->InitParameter(3, AnyTagged(zone)); | 536 function->InitParameter(3, AnyTagged(zone)); |
517 function->InitParameter(4, AnyTagged(zone)); | 537 function->InitParameter(4, AnyTagged(zone)); |
518 return function; | 538 return function; |
519 } | 539 } |
520 } // namespace internal | 540 } // namespace internal |
521 } // namespace v8 | 541 } // namespace v8 |
OLD | NEW |