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

Unified Diff: src/arm64/interface-descriptors-arm64.cc

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 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/arm/interface-descriptors-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/interface-descriptors-arm64.cc
diff --git a/src/arm64/interface-descriptors-arm64.cc b/src/arm64/interface-descriptors-arm64.cc
index ea85ba0b8673266e85bb9adcdcaeae92915ecd30..391880754b2a977aa0d2a179db802ed6bd1e4a11 100644
--- a/src/arm64/interface-descriptors-arm64.cc
+++ b/src/arm64/interface-descriptors-arm64.cc
@@ -68,59 +68,61 @@ const Register GrowArrayElementsDescriptor::ObjectRegister() { return x0; }
const Register GrowArrayElementsDescriptor::KeyRegister() { return x3; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x2: function info
Register registers[] = {cp, x2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x1: function
Register registers[] = {cp, x1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, x3};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x3: array literals array
// x2: array literal index
// x1: constant elements
Register registers[] = {cp, x3, x2, x1};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
- Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastCloneShallowObjectDescriptor::Initialize(
+void FastCloneShallowObjectDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x3: object literals array
@@ -128,71 +130,62 @@ void FastCloneShallowObjectDescriptor::Initialize(
// x1: constant properties
// x0: object literal flags
Register registers[] = {cp, x3, x2, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x2: feedback vector
// x3: call feedback slot
Register registers[] = {cp, x2, x3};
- Representation representations[] = {Representation::Tagged(),
- Representation::Tagged(),
- Representation::Smi()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CreateWeakCellDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CreateWeakCellDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x2: feedback vector
// x3: call feedback slot
// x1: tagged value to put in the weak cell
Register registers[] = {cp, x2, x3, x1};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
- Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StoreArrayLiteralElementDescriptor::Initialize(
+void StoreArrayLiteralElementDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, x3, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// x1 function the function to call
Register registers[] = {cp, x1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, x1, x3};
- Representation representations[] = {Representation::Tagged(),
- Representation::Tagged(),
- Representation::Smi()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionWithFeedbackAndVectorDescriptor::Initialize(
+void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, x1, x3, x2};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
- Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallConstructDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// x0 : number of arguments
// x1 : the function to call
// x2 : feedback vector
@@ -200,136 +193,137 @@ void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
// TODO(turbofan): So far we don't gather type feedback and hence skip the
// slot parameter, but ArrayConstructStub needs the vector to be undefined.
Register registers[] = {cp, x0, x1, x2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x2: length
// x1: index (of last match)
// x0: string
Register registers[] = {cp, x2, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x0: value (js_array)
// x1: to_map
Register registers[] = {cp, x0, x1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
Register registers[] = {cp};
- data->Initialize(arraysize(registers), registers, nullptr);
+ data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
}
-void ArrayConstructorConstantArgCountDescriptor::Initialize(
+void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x1: function
// x2: allocation site with elements kind
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1, x2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArrayConstructorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x2, x0};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(),
- Representation::Tagged(), Representation::Integer32()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
- CallInterfaceDescriptorData* data) {
+void InternalArrayConstructorConstantArgCountDescriptor::
+ InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
// cp: context
// x1: constructor function
// x0: number of arguments to the constructor function
Register registers[] = {cp, x1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void InternalArrayConstructorDescriptor::Initialize(
+void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, x1, x0};
- Representation representations[] = {Representation::Tagged(),
- Representation::Tagged(),
- Representation::Integer32()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CompareDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x0: value to compare
Register registers[] = {cp, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x0: value
Register registers[] = {cp, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// cp: context
// x2: allocation site
// x1: left operand
// x0: right operand
Register registers[] = {cp, x2, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// cp: context
// x1: left operand
// x0: right operand
Register registers[] = {cp, x1, x0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void KeyedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor noInlineDescriptor =
PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
@@ -337,16 +331,13 @@ void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
cp, // context
x2, // key
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- data->Initialize(arraysize(registers), registers, representations,
- &noInlineDescriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &noInlineDescriptor);
}
-void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NamedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor noInlineDescriptor =
PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
@@ -354,16 +345,13 @@ void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
cp, // context
x2, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- data->Initialize(arraysize(registers), registers, representations,
- &noInlineDescriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &noInlineDescriptor);
}
-void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallHandlerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
@@ -371,16 +359,13 @@ void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
cp, // context
x0, // receiver
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- data->Initialize(arraysize(registers), registers, representations,
- &default_descriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &default_descriptor);
}
-void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
@@ -390,18 +375,13 @@ void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
x0, // actual number of arguments
x2, // expected number of arguments
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // JSFunction
- Representation::Integer32(), // actual number of arguments
- Representation::Integer32(), // expected number of arguments
- };
- data->Initialize(arraysize(registers), registers, representations,
- &default_descriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &default_descriptor);
}
-void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
@@ -413,20 +393,13 @@ void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
x1, // api_function_address
x3, // actual number of arguments
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // callee
- Representation::Tagged(), // call_data
- Representation::Tagged(), // holder
- Representation::External(), // api_function_address
- Representation::Integer32(), // actual number of arguments
- };
- data->Initialize(arraysize(registers), registers, representations,
- &default_descriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &default_descriptor);
}
-void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiAccessorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
static PlatformInterfaceDescriptor default_descriptor =
PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
@@ -437,30 +410,19 @@ void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
x2, // holder
x1, // api_function_address
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // callee
- Representation::Tagged(), // call_data
- Representation::Tagged(), // holder
- Representation::External(), // api_function_address
- };
- data->Initialize(arraysize(registers), registers, representations,
- &default_descriptor);
+ data->InitializePlatformSpecific(arraysize(registers), registers,
+ &default_descriptor);
}
-void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathRoundVariantDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
x1, // math rounding function
x3, // vector slot id
};
- Representation representations[] = {
- Representation::Tagged(), //
- Representation::Tagged(), //
- Representation::Tagged(), //
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/arm/interface-descriptors-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698