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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interface-descriptors.cc
diff --git a/src/interface-descriptors.cc b/src/interface-descriptors.cc
index 88d4164f6a25b3f33def10777f4b608621eb4763..9cd8516c14b64c179ed4ecae7ff6ad43f877f758 100644
--- a/src/interface-descriptors.cc
+++ b/src/interface-descriptors.cc
@@ -137,36 +137,35 @@ void StoreDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
-
-void StoreTransitionDescriptor::InitializePlatformSpecific(
- CallInterfaceDescriptorData* data) {
- Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
- MapRegister()};
-
- data->InitializePlatformSpecific(arraysize(registers), registers);
+bool StoreTransitionDescriptor::PassVectorAndSlotOnStack() {
+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
+ return true;
+#else
+ return false;
+#endif
}
-
-void VectorStoreTransitionDescriptor::InitializePlatformSpecific(
+void StoreTransitionDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
- if (SlotRegister().is(no_reg)) {
- Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(),
- MapRegister(), VectorRegister()};
- data->InitializePlatformSpecific(arraysize(registers), registers);
- } else {
- Register registers[] = {ReceiverRegister(), NameRegister(),
- ValueRegister(), MapRegister(),
- SlotRegister(), VectorRegister()};
- data->InitializePlatformSpecific(arraysize(registers), registers);
+ Register registers[] = {
+ ReceiverRegister(), NameRegister(), MapRegister(),
+ ValueRegister(), SlotRegister(), VectorRegister(),
+ };
+ int len = arraysize(registers);
+ if (PassVectorAndSlotOnStack()) {
+ // Pass slot and vector on the stack.
+ len -= 2;
}
+ data->InitializePlatformSpecific(len, registers);
}
void StoreTransitionDescriptor::InitializePlatformIndependent(
CallInterfaceDescriptorData* data) {
- // kReceiver, kName, kValue, kMap
+ // kReceiver, kName, kMap, kValue, kSlot, kVector
MachineType machine_types[] = {
- MachineType::AnyTagged(), MachineType::AnyTagged(),
- MachineType::AnyTagged(), MachineType::AnyTagged()};
+ MachineType::AnyTagged(), MachineType::AnyTagged(),
+ MachineType::AnyTagged(), MachineType::AnyTagged(),
+ MachineType::TaggedSigned(), MachineType::AnyTagged()};
data->InitializePlatformIndependent(arraysize(machine_types), 0,
machine_types);
}
@@ -229,29 +228,6 @@ void LoadWithVectorDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void VectorStoreTransitionDescriptor::InitializePlatformIndependent(
- CallInterfaceDescriptorData* data) {
- bool has_slot = !VectorStoreTransitionDescriptor::SlotRegister().is(no_reg);
-
- if (has_slot) {
- // kReceiver, kName, kValue, kMap, kSlot, kVector
- MachineType machine_types[] = {
- MachineType::AnyTagged(), MachineType::AnyTagged(),
- MachineType::AnyTagged(), MachineType::AnyTagged(),
- MachineType::TaggedSigned(), MachineType::AnyTagged()};
- data->InitializePlatformIndependent(arraysize(machine_types), 0,
- machine_types);
- } else {
- // kReceiver, kName, kValue, kMap, kVector
- MachineType machine_types[] = {
- MachineType::AnyTagged(), MachineType::AnyTagged(),
- MachineType::AnyTagged(), MachineType::AnyTagged(),
- MachineType::AnyTagged()};
- data->InitializePlatformIndependent(arraysize(machine_types), 0,
- machine_types);
- }
-}
-
void StoreWithVectorDescriptor::InitializePlatformIndependent(
CallInterfaceDescriptorData* data) {
// kReceiver, kName, kValue, kSlot, kVector
« 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