Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: src/interface-descriptors.cc

Issue 2313093002: [stubs] Port StoreTransitionStub and ElementsTransitionAndStoreStub to TurboFan. (Closed)
Patch Set: Addressing comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 137 data->InitializePlatformSpecific(arraysize(registers), registers);
138 } 138 }
139 139
140 bool StoreTransitionDescriptor::PassVectorAndSlotOnStack() {
141 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
142 return true;
143 #else
144 return false;
145 #endif
146 }
140 147
141 void StoreTransitionDescriptor::InitializePlatformSpecific( 148 void StoreTransitionDescriptor::InitializePlatformSpecific(
142 CallInterfaceDescriptorData* data) { 149 CallInterfaceDescriptorData* data) {
143 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), 150 Register registers[] = {
144 MapRegister()}; 151 ReceiverRegister(), NameRegister(), MapRegister(),
145 152 ValueRegister(), SlotRegister(), VectorRegister(),
146 data->InitializePlatformSpecific(arraysize(registers), registers); 153 };
147 } 154 int len = arraysize(registers);
148 155 if (PassVectorAndSlotOnStack()) {
149 156 // Pass slot and vector on the stack.
150 void VectorStoreTransitionDescriptor::InitializePlatformSpecific( 157 len -= 2;
151 CallInterfaceDescriptorData* data) {
152 if (SlotRegister().is(no_reg)) {
153 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
154 MapRegister(), VectorRegister()};
155 data->InitializePlatformSpecific(arraysize(registers), registers);
156 } else {
157 Register registers[] = {ReceiverRegister(), NameRegister(),
158 ValueRegister(), MapRegister(),
159 SlotRegister(), VectorRegister()};
160 data->InitializePlatformSpecific(arraysize(registers), registers);
161 } 158 }
159 data->InitializePlatformSpecific(len, registers);
162 } 160 }
163 161
164 void StoreTransitionDescriptor::InitializePlatformIndependent( 162 void StoreTransitionDescriptor::InitializePlatformIndependent(
165 CallInterfaceDescriptorData* data) { 163 CallInterfaceDescriptorData* data) {
166 // kReceiver, kName, kValue, kMap 164 // kReceiver, kName, kMap, kValue, kSlot, kVector
167 MachineType machine_types[] = { 165 MachineType machine_types[] = {
168 MachineType::AnyTagged(), MachineType::AnyTagged(), 166 MachineType::AnyTagged(), MachineType::AnyTagged(),
169 MachineType::AnyTagged(), MachineType::AnyTagged()}; 167 MachineType::AnyTagged(), MachineType::AnyTagged(),
168 MachineType::TaggedSigned(), MachineType::AnyTagged()};
170 data->InitializePlatformIndependent(arraysize(machine_types), 0, 169 data->InitializePlatformIndependent(arraysize(machine_types), 0,
171 machine_types); 170 machine_types);
172 } 171 }
173 172
174 void StoreGlobalViaContextDescriptor::InitializePlatformIndependent( 173 void StoreGlobalViaContextDescriptor::InitializePlatformIndependent(
175 CallInterfaceDescriptorData* data) { 174 CallInterfaceDescriptorData* data) {
176 // kSlot, kValue 175 // kSlot, kValue
177 MachineType machine_types[] = {MachineType::Int32(), 176 MachineType machine_types[] = {MachineType::Int32(),
178 MachineType::AnyTagged()}; 177 MachineType::AnyTagged()};
179 data->InitializePlatformIndependent(arraysize(machine_types), 0, 178 data->InitializePlatformIndependent(arraysize(machine_types), 0,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 221 }
223 222
224 223
225 void LoadWithVectorDescriptor::InitializePlatformSpecific( 224 void LoadWithVectorDescriptor::InitializePlatformSpecific(
226 CallInterfaceDescriptorData* data) { 225 CallInterfaceDescriptorData* data) {
227 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), 226 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(),
228 VectorRegister()}; 227 VectorRegister()};
229 data->InitializePlatformSpecific(arraysize(registers), registers); 228 data->InitializePlatformSpecific(arraysize(registers), registers);
230 } 229 }
231 230
232 void VectorStoreTransitionDescriptor::InitializePlatformIndependent(
233 CallInterfaceDescriptorData* data) {
234 bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg);
235
236 if (has_slot) {
237 // kReceiver, kName, kValue, kMap, kSlot, kVector
238 MachineType machine_types[] = {
239 MachineType::AnyTagged(), MachineType::AnyTagged(),
240 MachineType::AnyTagged(), MachineType::AnyTagged(),
241 MachineType::TaggedSigned(), MachineType::AnyTagged()};
242 data->InitializePlatformIndependent(arraysize(machine_types), 0,
243 machine_types);
244 } else {
245 // kReceiver, kName, kValue, kMap, kVector
246 MachineType machine_types[] = {
247 MachineType::AnyTagged(), MachineType::AnyTagged(),
248 MachineType::AnyTagged(), MachineType::AnyTagged(),
249 MachineType::AnyTagged()};
250 data->InitializePlatformIndependent(arraysize(machine_types), 0,
251 machine_types);
252 }
253 }
254
255 void StoreWithVectorDescriptor::InitializePlatformIndependent( 231 void StoreWithVectorDescriptor::InitializePlatformIndependent(
256 CallInterfaceDescriptorData* data) { 232 CallInterfaceDescriptorData* data) {
257 // kReceiver, kName, kValue, kSlot, kVector 233 // kReceiver, kName, kValue, kSlot, kVector
258 MachineType machine_types[] = { 234 MachineType machine_types[] = {
259 MachineType::AnyTagged(), MachineType::AnyTagged(), 235 MachineType::AnyTagged(), MachineType::AnyTagged(),
260 MachineType::AnyTagged(), MachineType::TaggedSigned(), 236 MachineType::AnyTagged(), MachineType::TaggedSigned(),
261 MachineType::AnyTagged()}; 237 MachineType::AnyTagged()};
262 data->InitializePlatformIndependent(arraysize(machine_types), 0, 238 data->InitializePlatformIndependent(arraysize(machine_types), 0,
263 machine_types); 239 machine_types);
264 } 240 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // kAccumulator, kBytecodeOffset, kBytecodeArray, kDispatchTable 486 // kAccumulator, kBytecodeOffset, kBytecodeArray, kDispatchTable
511 MachineType machine_types[] = {MachineType::AnyTagged(), MachineType::Int32(), 487 MachineType machine_types[] = {MachineType::AnyTagged(), MachineType::Int32(),
512 MachineType::AnyTagged(), 488 MachineType::AnyTagged(),
513 MachineType::AnyTagged()}; 489 MachineType::AnyTagged()};
514 data->InitializePlatformIndependent(arraysize(machine_types), 0, 490 data->InitializePlatformIndependent(arraysize(machine_types), 0,
515 machine_types); 491 machine_types);
516 } 492 }
517 493
518 } // namespace internal 494 } // namespace internal
519 } // namespace v8 495 } // namespace v8
OLDNEW
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698