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 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 MachineType::AnyTagged(), MachineType::AnyTagged(), | 127 MachineType::AnyTagged(), MachineType::AnyTagged(), |
128 MachineType::AnyTagged(), MachineType::TaggedSigned()}; | 128 MachineType::AnyTagged(), MachineType::TaggedSigned()}; |
129 data->InitializePlatformIndependent(arraysize(machine_types), 0, | 129 data->InitializePlatformIndependent(arraysize(machine_types), 0, |
130 machine_types); | 130 machine_types); |
131 } | 131 } |
132 | 132 |
133 void StoreDescriptor::InitializePlatformSpecific( | 133 void StoreDescriptor::InitializePlatformSpecific( |
134 CallInterfaceDescriptorData* data) { | 134 CallInterfaceDescriptorData* data) { |
135 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), | 135 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
136 SlotRegister()}; | 136 SlotRegister()}; |
137 data->InitializePlatformSpecific(arraysize(registers), registers); | |
138 } | |
139 | 137 |
140 bool StoreTransitionDescriptor::PassVectorAndSlotOnStack() { | 138 int len = arraysize(registers) - kStackArgumentsCount; |
141 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 | 139 data->InitializePlatformSpecific(len, registers); |
142 return true; | |
143 #else | |
144 return false; | |
145 #endif | |
146 } | 140 } |
147 | 141 |
148 void StoreTransitionDescriptor::InitializePlatformSpecific( | 142 void StoreTransitionDescriptor::InitializePlatformSpecific( |
149 CallInterfaceDescriptorData* data) { | 143 CallInterfaceDescriptorData* data) { |
150 Register registers[] = { | 144 Register registers[] = { |
151 ReceiverRegister(), NameRegister(), MapRegister(), | 145 ReceiverRegister(), NameRegister(), MapRegister(), |
152 ValueRegister(), SlotRegister(), VectorRegister(), | 146 ValueRegister(), SlotRegister(), VectorRegister(), |
153 }; | 147 }; |
154 int len = arraysize(registers); | 148 int len = arraysize(registers) - kStackArgumentsCount; |
155 if (PassVectorAndSlotOnStack()) { | |
156 // Pass slot and vector on the stack. | |
157 len -= 2; | |
158 } | |
159 data->InitializePlatformSpecific(len, registers); | 149 data->InitializePlatformSpecific(len, registers); |
160 } | 150 } |
161 | 151 |
162 void StoreTransitionDescriptor::InitializePlatformIndependent( | 152 void StoreTransitionDescriptor::InitializePlatformIndependent( |
163 CallInterfaceDescriptorData* data) { | 153 CallInterfaceDescriptorData* data) { |
164 // kReceiver, kName, kMap, kValue, kSlot, kVector | 154 // kReceiver, kName, kMap, kValue, kSlot, kVector |
165 MachineType machine_types[] = { | 155 MachineType machine_types[] = { |
166 MachineType::AnyTagged(), MachineType::AnyTagged(), | 156 MachineType::AnyTagged(), MachineType::AnyTagged(), |
167 MachineType::AnyTagged(), MachineType::AnyTagged(), | 157 MachineType::AnyTagged(), MachineType::AnyTagged(), |
168 MachineType::TaggedSigned(), MachineType::AnyTagged()}; | 158 MachineType::TaggedSigned(), MachineType::AnyTagged()}; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 MachineType::AnyTagged(), MachineType::TaggedSigned(), | 226 MachineType::AnyTagged(), MachineType::TaggedSigned(), |
237 MachineType::AnyTagged()}; | 227 MachineType::AnyTagged()}; |
238 data->InitializePlatformIndependent(arraysize(machine_types), 0, | 228 data->InitializePlatformIndependent(arraysize(machine_types), 0, |
239 machine_types); | 229 machine_types); |
240 } | 230 } |
241 | 231 |
242 void StoreWithVectorDescriptor::InitializePlatformSpecific( | 232 void StoreWithVectorDescriptor::InitializePlatformSpecific( |
243 CallInterfaceDescriptorData* data) { | 233 CallInterfaceDescriptorData* data) { |
244 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), | 234 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
245 SlotRegister(), VectorRegister()}; | 235 SlotRegister(), VectorRegister()}; |
246 data->InitializePlatformSpecific(arraysize(registers), registers); | 236 int len = arraysize(registers) - kStackArgumentsCount; |
| 237 data->InitializePlatformSpecific(len, registers); |
247 } | 238 } |
248 | 239 |
249 void BinaryOpWithVectorDescriptor::InitializePlatformIndependent( | 240 void BinaryOpWithVectorDescriptor::InitializePlatformIndependent( |
250 CallInterfaceDescriptorData* data) { | 241 CallInterfaceDescriptorData* data) { |
251 // kLeft, kRight, kSlot, kVector | 242 // kLeft, kRight, kSlot, kVector |
252 MachineType machine_types[] = {MachineType::AnyTagged(), | 243 MachineType machine_types[] = {MachineType::AnyTagged(), |
253 MachineType::AnyTagged(), MachineType::Int32(), | 244 MachineType::AnyTagged(), MachineType::Int32(), |
254 MachineType::AnyTagged()}; | 245 MachineType::AnyTagged()}; |
255 data->InitializePlatformIndependent(arraysize(machine_types), 0, | 246 data->InitializePlatformIndependent(arraysize(machine_types), 0, |
256 machine_types); | 247 machine_types); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 // kAccumulator, kBytecodeOffset, kBytecodeArray, kDispatchTable | 419 // kAccumulator, kBytecodeOffset, kBytecodeArray, kDispatchTable |
429 MachineType machine_types[] = {MachineType::AnyTagged(), MachineType::Int32(), | 420 MachineType machine_types[] = {MachineType::AnyTagged(), MachineType::Int32(), |
430 MachineType::AnyTagged(), | 421 MachineType::AnyTagged(), |
431 MachineType::AnyTagged()}; | 422 MachineType::AnyTagged()}; |
432 data->InitializePlatformIndependent(arraysize(machine_types), 0, | 423 data->InitializePlatformIndependent(arraysize(machine_types), 0, |
433 machine_types); | 424 machine_types); |
434 } | 425 } |
435 | 426 |
436 } // namespace internal | 427 } // namespace internal |
437 } // namespace v8 | 428 } // namespace v8 |
OLD | NEW |