const Register GrowArrayElementsDescriptor::KeyRegister() { return r3; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r3};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r3, r2, r1};
- 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) {
Register registers[] = {cp, r3, r2, r1, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r2, r3};
- 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) {
Register registers[] = {cp, r2, r3, r1};
- 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, r3, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r1, r3};
- 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, r1, r3, r2};
- 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) {
// r0 : number of arguments
// r1 : the function to call
// r2 : feedback vector
// 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, r0, r1, r2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r2, r1, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r0, r1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// 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) {
// register state
// cp -- context
// r1 -- function
// r2 -- allocation site with elements kind
Register registers[] = {cp, r1, r2};
- 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, r1, r2, r0};
- 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) {
// register state
// cp -- context
// r0 -- number of arguments
// r1 -- constructor function
Register registers[] = {cp, r1};
- 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, r1, r0};
- 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) {
Register registers[] = {cp, r1, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r1, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r2, r1, r0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, r1, r0};
- 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);
cp, // context
r2, // 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);
cp, // context
r2, // 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);
cp, // context
r0, // 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);
r0, // actual number of arguments
r2, // 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);
r1, // api_function_address
r3, // 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);
r2, // holder
r1, // 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
r1, // math rounding function
r3, // 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
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
// 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
// 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);
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);
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);
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);
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);
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);
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
bool runtime_stack_params = descriptor_.stack_parameter_count().is_valid();
HInstruction* stack_parameter_count = NULL;
for (int i = 0; i < param_count; ++i) {
- Representation r = descriptor_.GetEnvironmentParameterRepresentation(i);
+ Representation r =
+ RepresentationFromType(descriptor_.GetEnvironmentParameterType(i));
HParameter* param = Add<HParameter>(i,
HParameter::REGISTER_PARAMETER, r);
start_environment->Bind(i, param);
// Build a "hybrid" CompilationInfo for a JSFunction/CodeStub pair.
ParseInfo parse_info(&zone, inner);
CompilationInfo info(&parse_info);
+ info.SetFunctionType(GetCallInterfaceDescriptor().GetFunctionType());
info.SetStub(this);
return info.GenerateCodeStub();
}
}
+Representation RepresentationFromType(Type* type) {
+ if (type->Is(Type::UntaggedSigned()) || type->Is(Type::UntaggedUnsigned())) {
+ return Representation::Integer32();
+ }
+
+ if (type->Is(Type::TaggedSigned())) {
+ return Representation::Smi();
+ }
+
+ if (type->Is(Type::UntaggedPointer())) {
+ return Representation::External();
+ }
+
+ DCHECK(!type->Is(Type::Untagged()));
+ return Representation::Tagged();
+}
} // namespace internal
} // namespace v8
return call_descriptor().GetEnvironmentParameterCount();
}
- Representation GetEnvironmentParameterRepresentation(int index) const {
- return call_descriptor().GetEnvironmentParameterRepresentation(index);
+ Type* GetEnvironmentParameterType(int index) const {
+ return call_descriptor().GetEnvironmentParameterType(index);
}
ExternalReference miss_handler() const {
#undef DEFINE_HYDROGEN_CODE_STUB
#undef DEFINE_CODE_STUB
#undef DEFINE_CODE_STUB_BASE
+
+extern Representation RepresentationFromType(Type* type);
} } // namespace v8::internal
#endif // V8_CODE_STUBS_H_
opt_count_(has_shared_info() ? shared_info()->opt_count() : 0),
parameter_count_(0),
optimization_id_(-1),
- osr_expr_stack_height_(0) {}
+ osr_expr_stack_height_(0),
+ function_type_(nullptr) {}
CompilationInfo::~CompilationInfo() {
#include "src/ast.h"
#include "src/bailout-reason.h"
#include "src/compilation-dependencies.h"
+#include "src/signature.h"
#include "src/zone.h"
namespace v8 {
optimization_id_ = isolate()->NextOptimizationId();
}
+ void SetFunctionType(Type::FunctionType* function_type) {
+ function_type_ = function_type;
+ }
+ Type::FunctionType* function_type() const { return function_type_; }
+
void SetStub(CodeStub* code_stub) {
SetMode(STUB);
code_stub_ = code_stub;
int osr_expr_stack_height_;
+ Type::FunctionType* function_type_;
+
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
};
// The first parameters go in registers.
Register reg = descriptor.GetEnvironmentParameterRegister(i);
Representation rep =
- descriptor.GetEnvironmentParameterRepresentation(i);
+ RepresentationFromType(descriptor.GetEnvironmentParameterType(i));
locations.AddParam(regloc(reg));
types.AddParam(reptyp(rep));
} else {
SmartPointer<Typer> typer;
if (info()->is_typing_enabled()) {
// Type the graph.
- typer.Reset(new Typer(isolate(), data.graph(), info()->context()));
+ typer.Reset(new Typer(isolate(), data.graph(), info()->function_type(),
+ info()->context()));
Run<TyperPhase>(typer.get());
RunPrintAndVerify("Typed");
}
};
-Typer::Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context)
+Typer::Typer(Isolate* isolate, Graph* graph, Type::FunctionType* function_type,
+ MaybeHandle<Context> context)
: isolate_(isolate),
graph_(graph),
+ function_type_(function_type),
context_(context),
decorator_(NULL),
cache_(new (graph->zone()) LazyTypeCache(isolate, graph->zone())) {
Bounds Typer::Visitor::TypeParameter(Node* node) {
+ int param = OpParameter<int>(node);
+ Type::FunctionType* function_type = typer_->function_type();
+ if (function_type != nullptr && param >= 0 &&
+ param < static_cast<int>(function_type->Arity())) {
+ return Bounds(Type::None(), function_type->Parameter(param));
+ }
return Bounds::Unbounded(zone());
}
class Typer {
public:
- Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context);
+ Typer(Isolate* isolate, Graph* graph, Type::FunctionType* function_type,
+ MaybeHandle<Context> context);
~Typer();
void Run();
MaybeHandle<Context> context() const { return context_; }
Zone* zone() const { return graph()->zone(); }
Isolate* isolate() const { return isolate_; }
+ Type::FunctionType* function_type() const { return function_type_; }
Isolate* const isolate_;
Graph* const graph_;
+ Type::FunctionType* function_type_;
MaybeHandle<Context> const context_;
Decorator* decorator_;
} else {
int par_index = index - 1;
DCHECK(par_index < descriptor_.GetEnvironmentLength());
- return descriptor_.GetParameterRepresentation(par_index);
+ return RepresentationFromType(descriptor_.GetParameterType(par_index));
}
}
const Register GrowArrayElementsDescriptor::KeyRegister() { return ebx; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, ebx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, edi};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// ToNumberStub invokes a function, and therefore needs a context.
Register registers[] = {esi, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, ebx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, eax, ebx, ecx};
- 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) {
Register registers[] = {esi, eax, ebx, ecx, edx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, ebx, edx};
- 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) {
Register registers[] = {esi, ebx, edx, edi};
- 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[] = {esi, ecx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, edi};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, edi, edx};
- 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[] = {esi, edi, edx, ebx};
- 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) {
// eax : number of arguments
// ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback
// 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[] = {esi, eax, edi, ebx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, ecx, ebx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, eax, ebx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// esi -- context
Register registers[] = {esi};
- data->Initialize(arraysize(registers), registers, nullptr);
+ data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
}
-void ArrayConstructorConstantArgCountDescriptor::Initialize(
+void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// eax -- number of arguments
// edi -- function
// ebx -- allocation site with elements kind
Register registers[] = {esi, edi, ebx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArrayConstructorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, ebx, eax};
- 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) {
// register state
// eax -- number of arguments
// edi -- function
Register registers[] = {esi, edi};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void InternalArrayConstructorDescriptor::Initialize(
+void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {esi, edi, eax};
- 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) {
Register registers[] = {esi, edx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, edx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {esi, ecx, edx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {esi, edx, eax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void KeyedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
ecx, // key
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NamedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
ecx, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallHandlerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
edx, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
edi, // JSFunction
eax, // actual number of arguments
ebx, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
edi, // callee
edx, // api_function_address
eax, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiAccessorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
edi, // callee
ecx, // holder
edx, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathRoundVariantDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
esi, // context
edi, // math rounding function
edx, // 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
namespace v8 {
namespace internal {
-void CallInterfaceDescriptorData::Initialize(
+namespace {
+// Constructors for common combined semantic and representation types.
+Type* SmiType() {
+ return Type::Intersect(Type::SignedSmall(), Type::TaggedSigned());
+}
+
+
+Type* UntaggedSigned32() {
+ return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32());
+}
+
+
+Type* AnyTagged() {
+ return Type::Intersect(
+ Type::Any(), Type::Union(Type::TaggedPointer(), Type::TaggedSigned()));
+}
+
+
+Type* ExternalPointer() {
+ return Type::Intersect(Type::Internal(), Type::UntaggedPointer());
+}
+}
+
+
+Type::FunctionType* CallInterfaceDescriptor::BuildDefaultFunctionType(
+ Isolate* isolate, int parameter_count) {
+ Type::FunctionType* function =
+ Type::FunctionType::New(AnyTagged(), Type::Undefined(), parameter_count,
+ isolate->interface_descriptor_zone());
+ while (parameter_count-- != 0) {
+ function->InitParameter(parameter_count, AnyTagged());
+ }
+ return function;
+}
+
+
+void CallInterfaceDescriptorData::InitializePlatformSpecific(
int register_parameter_count, Register* registers,
- Representation* register_param_representations,
PlatformInterfaceDescriptor* platform_descriptor) {
platform_specific_descriptor_ = platform_descriptor;
register_param_count_ = register_parameter_count;
for (int i = 0; i < register_parameter_count; i++) {
register_params_[i] = registers[i];
}
-
- // If a representations array is specified, then the descriptor owns that as
- // well.
- if (register_param_representations != NULL) {
- register_param_representations_.Reset(
- NewArray<Representation>(register_parameter_count));
- for (int i = 0; i < register_parameter_count; i++) {
- // If there is a context register, the representation must be tagged.
- DCHECK(
- i != 0 ||
- register_param_representations[i].Equals(Representation::Tagged()));
- register_param_representations_[i] = register_param_representations[i];
- }
- }
}
-
const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const {
CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0);
size_t index = data_ - start;
}
-void LoadDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, AnyTagged());
+ function->InitParameter(3, SmiType());
+ return function;
+}
+
+void LoadDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
SlotRegister()};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(),
- Representation::Tagged(), Representation::Smi()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StoreDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StoreDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
ValueRegister()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StoreTransitionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StoreTransitionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
ValueRegister(), MapRegister()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ElementTransitionAndStoreDescriptor::Initialize(
+void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ValueRegister(), MapRegister(),
NameRegister(), ReceiverRegister()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void InstanceofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void InstanceofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), left(), right()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathPowTaggedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathPowTaggedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), exponent()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathPowIntegerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathPowIntegerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), exponent()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
+}
+
+
+Type::FunctionType*
+LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, AnyTagged());
+ function->InitParameter(3, SmiType());
+ function->InitParameter(4, AnyTagged());
+ return function;
}
-void LoadWithVectorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void LoadWithVectorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
SlotRegister(), VectorRegister()};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(),
- Representation::Tagged(), Representation::Smi(),
- Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
+}
+
+
+Type::FunctionType*
+VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 6, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, AnyTagged());
+ function->InitParameter(3, AnyTagged());
+ function->InitParameter(4, SmiType());
+ function->InitParameter(5, AnyTagged());
+ return function;
}
-void VectorStoreICDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void VectorStoreICDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(),
NameRegister(), ValueRegister(),
SlotRegister(), VectorRegister()};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(),
- Representation::Tagged(), Representation::Tagged(),
- Representation::Smi(), Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void VectorStoreICTrampolineDescriptor::Initialize(
+Type::FunctionType*
+VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, AnyTagged());
+ function->InitParameter(3, AnyTagged());
+ function->InitParameter(4, SmiType());
+ return function;
+}
+
+
+void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
ValueRegister(), SlotRegister()};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(),
- Representation::Tagged(), Representation::Tagged(),
- Representation::Smi()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiGetterDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+Type::FunctionType*
+ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, ExternalPointer());
+ return function;
+}
+
+
+void ApiGetterDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), function_address()};
- Representation representations[] = {Representation::Tagged(),
- Representation::External()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArgumentsAccessReadDescriptor::Initialize(
+void ArgumentsAccessReadDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), index(), parameter_count()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ContextOnlyDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ContextOnlyDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void GrowArrayElementsDescriptor::Initialize(
+void GrowArrayElementsDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ContextRegister(), ObjectRegister(), KeyRegister()};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
+}
+
+
+Type::FunctionType*
+FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, SmiType());
+ function->InitParameter(3, AnyTagged());
+ return function;
+}
+
+
+Type::FunctionType*
+CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, SmiType());
+ return function;
}
+
+
+Type::FunctionType*
+CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, AnyTagged());
+ function->InitParameter(2, SmiType());
+ function->InitParameter(3, AnyTagged());
+ return function;
+}
+
+
+Type::FunctionType*
+CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, Type::Receiver()); // JSFunction
+ function->InitParameter(2, SmiType());
+ return function;
+}
+
+
+Type::FunctionType* CallFunctionWithFeedbackAndVectorDescriptor::
+ BuildCallInterfaceDescriptorFunctionType(Isolate* isolate,
+ int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, Type::Receiver()); // JSFunction
+ function->InitParameter(2, SmiType());
+ function->InitParameter(3, AnyTagged());
+ return function;
+}
+
+
+Type::FunctionType*
+ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, Type::Receiver()); // JSFunction
+ function->InitParameter(2, AnyTagged());
+ function->InitParameter(3, UntaggedSigned32());
+ return function;
+}
+
+
+Type::FunctionType*
+InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged());
+ function->InitParameter(1, Type::Receiver()); // JSFunction
+ function->InitParameter(2, UntaggedSigned32());
+ return function;
+}
+
+
+Type::FunctionType*
+ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged()); // context
+ function->InitParameter(1, Type::Receiver()); // JSFunction
+ function->InitParameter(2, UntaggedSigned32()); // actual number of arguments
+ function->InitParameter(3,
+ UntaggedSigned32()); // expected number of arguments
+ return function;
+}
+
+
+Type::FunctionType*
+ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 6, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged()); // context
+ function->InitParameter(1, AnyTagged()); // callee
+ function->InitParameter(2, AnyTagged()); // call_data
+ function->InitParameter(3, AnyTagged()); // holder
+ function->InitParameter(4, ExternalPointer()); // api_function_address
+ function->InitParameter(5, UntaggedSigned32()); // actual number of arguments
+ return function;
+}
+
+
+Type::FunctionType*
+ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone());
+ function->InitParameter(0, AnyTagged()); // context
+ function->InitParameter(1, AnyTagged()); // callee
+ function->InitParameter(2, AnyTagged()); // call_data
+ function->InitParameter(3, AnyTagged()); // holder
+ function->InitParameter(4, ExternalPointer()); // api_function_address
+ return function;
+}
+
+
+Type::FunctionType*
+MathRoundVariantDescriptor::BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int paramater_count) {
+ Type::FunctionType* function = Type::FunctionType::New(
+ AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone());
+ function->InitParameter(0, Type::Receiver());
+ function->InitParameter(1, SmiType());
+ function->InitParameter(2, AnyTagged());
+ return function;
+}
+
+
} // namespace internal
} // namespace v8
V(StoreArrayLiteralElement) \
V(MathPowTagged) \
V(MathPowInteger) \
- V(MathRoundVariant) \
V(ContextOnly) \
- V(GrowArrayElements)
+ V(GrowArrayElements) \
+ V(MathRoundVariant)
class CallInterfaceDescriptorData {
public:
- CallInterfaceDescriptorData() : register_param_count_(-1) {}
+ CallInterfaceDescriptorData()
+ : stack_paramater_count_(-1),
+ register_param_count_(-1),
+ function_type_(nullptr) {}
// A copy of the passed in registers and param_representations is made
// and owned by the CallInterfaceDescriptorData.
+ void InitializePlatformIndependent(int stack_paramater_count,
+ Type::FunctionType* function_type) {
+ function_type_ = function_type;
+ stack_paramater_count_ = stack_paramater_count;
+ }
+
// TODO(mvstanton): Instead of taking parallel arrays register and
// param_representations, how about a struct that puts the representation
// and register side by side (eg, RegRep(r1, Representation::Tagged()).
// The same should go for the CodeStubDescriptor class.
- void Initialize(int register_parameter_count, Register* registers,
- Representation* param_representations,
- PlatformInterfaceDescriptor* platform_descriptor = NULL);
+ void InitializePlatformSpecific(
+ int register_parameter_count, Register* registers,
+ PlatformInterfaceDescriptor* platform_descriptor = NULL);
bool IsInitialized() const { return register_param_count_ >= 0; }
int register_param_count() const { return register_param_count_; }
Register register_param(int index) const { return register_params_[index]; }
Register* register_params() const { return register_params_.get(); }
- Representation register_param_representation(int index) const {
- return register_param_representations_[index];
- }
- Representation* register_param_representations() const {
- return register_param_representations_.get();
+ Type* register_param_type(int index) const {
+ return function_type_->Parameter(index);
}
PlatformInterfaceDescriptor* platform_specific_descriptor() const {
return platform_specific_descriptor_;
}
+ Type::FunctionType* function_type() const { return function_type_; }
+
private:
+ int stack_paramater_count_;
int register_param_count_;
// The Register params are allocated dynamically by the
// arrays of Registers cause creation of runtime static initializers
// which we don't want.
SmartArrayPointer<Register> register_params_;
- // Specifies Representations for the stub's parameter. Points to an array of
- // Representations of the same length of the numbers of parameters to the
- // stub, or if NULL (the default value), Representation of each parameter
- // assumed to be Tagged().
- SmartArrayPointer<Representation> register_param_representations_;
+
+ // Specifies types for parameters and return
+ Type::FunctionType* function_type_;
PlatformInterfaceDescriptor* platform_specific_descriptor_;
class CallInterfaceDescriptor {
public:
CallInterfaceDescriptor() : data_(NULL) {}
+ virtual ~CallInterfaceDescriptor() {}
CallInterfaceDescriptor(Isolate* isolate, CallDescriptors::Key key)
: data_(isolate->call_descriptor_data(key)) {}
return data()->register_param(index);
}
- Representation GetParameterRepresentation(int index) const {
+ Type* GetParameterType(int index) const {
DCHECK(index < data()->register_param_count());
- if (data()->register_param_representations() == NULL) {
- return Representation::Tagged();
- }
-
- return data()->register_param_representation(index);
+ return data()->register_param_type(index);
}
// "Environment" versions of parameter functions. The first register
return GetParameterRegister(index + 1);
}
- Representation GetEnvironmentParameterRepresentation(int index) const {
- return GetParameterRepresentation(index + 1);
+ Type* GetEnvironmentParameterType(int index) const {
+ return GetParameterType(index + 1);
}
// Some platforms have extra information to associate with the descriptor.
return data()->platform_specific_descriptor();
}
+ Type::FunctionType* GetFunctionType() const {
+ return data()->function_type();
+ }
+
static const Register ContextRegister();
const char* DebugName(Isolate* isolate) const;
+ static Type::FunctionType* BuildDefaultFunctionType(Isolate* isolate,
+ int paramater_count);
+
protected:
const CallInterfaceDescriptorData* data() const { return data_; }
+ virtual Type::FunctionType* BuildCallInterfaceDescriptorFunctionType(
+ Isolate* isolate, int register_param_count) {
+ return BuildDefaultFunctionType(isolate, register_param_count);
+ }
+
+ virtual void InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
+ UNREACHABLE();
+ }
+
+ void Initialize(Isolate* isolate, CallDescriptors::Key key) {
+ if (!data()->IsInitialized()) {
+ CallInterfaceDescriptorData* d = isolate->call_descriptor_data(key);
+ InitializePlatformSpecific(d);
+ Type::FunctionType* function_type =
+ BuildCallInterfaceDescriptorFunctionType(isolate,
+ d->register_param_count());
+ d->InitializePlatformIndependent(0, function_type);
+ }
+ }
+
private:
const CallInterfaceDescriptorData* data_;
};
-#define DECLARE_DESCRIPTOR(name, base) \
- explicit name(Isolate* isolate) : base(isolate, key()) { \
- if (!data()->IsInitialized()) \
- Initialize(isolate->call_descriptor_data(key())); \
- } \
- \
- protected: \
- void Initialize(CallInterfaceDescriptorData* data); \
- name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
- \
- public: \
+#define DECLARE_DESCRIPTOR(name, base) \
+ explicit name(Isolate* isolate) : base(isolate, key()) { \
+ Initialize(isolate, key()); \
+ } \
+ \
+ protected: \
+ void InitializePlatformSpecific(CallInterfaceDescriptorData* data) override; \
+ name(Isolate* isolate, CallDescriptors::Key key) : base(isolate, key) {} \
+ \
+ public: \
static inline CallDescriptors::Key key();
+#define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \
+ DECLARE_DESCRIPTOR(name, base) \
+ protected: \
+ virtual Type::FunctionType* BuildCallInterfaceDescriptorFunctionType( \
+ Isolate* isolate, int register_param_count) override; \
+ \
+ public:
// LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs.
class LoadDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(LoadDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadDescriptor,
+ CallInterfaceDescriptor)
enum ParameterIndices { kReceiverIndex, kNameIndex, kSlotIndex };
static const Register ReceiverRegister();
class VectorStoreICTrampolineDescriptor : public StoreDescriptor {
public:
- DECLARE_DESCRIPTOR(VectorStoreICTrampolineDescriptor, StoreDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(
+ VectorStoreICTrampolineDescriptor, StoreDescriptor)
enum ParameterIndices { kReceiverIndex, kNameIndex, kValueIndex, kSlotIndex };
class VectorStoreICDescriptor : public VectorStoreICTrampolineDescriptor {
public:
- DECLARE_DESCRIPTOR(VectorStoreICDescriptor, VectorStoreICTrampolineDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(
+ VectorStoreICDescriptor, VectorStoreICTrampolineDescriptor)
enum ParameterIndices {
kReceiverIndex,
class LoadWithVectorDescriptor : public LoadDescriptor {
public:
- DECLARE_DESCRIPTOR(LoadWithVectorDescriptor, LoadDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(LoadWithVectorDescriptor,
+ LoadDescriptor)
enum ParameterIndices {
kReceiverIndex,
class FastCloneShallowArrayDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(FastCloneShallowArrayDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(FastCloneShallowArrayDescriptor,
+ CallInterfaceDescriptor)
};
class CreateAllocationSiteDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(CreateAllocationSiteDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CreateAllocationSiteDescriptor,
+ CallInterfaceDescriptor)
};
kParameterCount
};
- DECLARE_DESCRIPTOR(CreateWeakCellDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(CreateWeakCellDescriptor,
+ CallInterfaceDescriptor)
};
class CallFunctionWithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(CallFunctionWithFeedbackDescriptor,
- CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(
+ CallFunctionWithFeedbackDescriptor, CallInterfaceDescriptor)
};
class CallFunctionWithFeedbackAndVectorDescriptor
: public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(CallFunctionWithFeedbackAndVectorDescriptor,
- CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(
+ CallFunctionWithFeedbackAndVectorDescriptor, CallInterfaceDescriptor)
};
class ArrayConstructorDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(ArrayConstructorDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ArrayConstructorDescriptor,
+ CallInterfaceDescriptor)
};
class InternalArrayConstructorDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(InternalArrayConstructorDescriptor,
- CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(
+ InternalArrayConstructorDescriptor, CallInterfaceDescriptor)
};
class ArgumentAdaptorDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(ArgumentAdaptorDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ArgumentAdaptorDescriptor,
+ CallInterfaceDescriptor)
};
class ApiFunctionDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(ApiFunctionDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ApiFunctionDescriptor,
+ CallInterfaceDescriptor)
};
class ApiAccessorDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(ApiAccessorDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ApiAccessorDescriptor,
+ CallInterfaceDescriptor)
};
class ApiGetterDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(ApiGetterDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(ApiGetterDescriptor,
+ CallInterfaceDescriptor)
static const Register function_address();
};
class MathRoundVariantDescriptor : public CallInterfaceDescriptor {
public:
- DECLARE_DESCRIPTOR(MathRoundVariantDescriptor, CallInterfaceDescriptor)
+ DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(MathRoundVariantDescriptor,
+ CallInterfaceDescriptor)
};
return handle_scope_implementer_;
}
Zone* runtime_zone() { return &runtime_zone_; }
+ Zone* interface_descriptor_zone() { return &interface_descriptor_zone_; }
UnicodeCache* unicode_cache() {
return unicode_cache_;
HandleScopeImplementer* handle_scope_implementer_;
UnicodeCache* unicode_cache_;
Zone runtime_zone_;
+ Zone interface_descriptor_zone_;
InnerPointerToCodeCache* inner_pointer_to_code_cache_;
GlobalHandles* global_handles_;
EternalHandles* eternal_handles_;
const Register GrowArrayElementsDescriptor::KeyRegister() { return a3; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a3};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a3, a2, a1};
- 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) {
Register registers[] = {cp, a3, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a3};
- 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) {
Register registers[] = {cp, a2, a3, a1};
- 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, a3, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a3};
- 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, a1, a3, a2};
- 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) {
// a0 : number of arguments
// a1 : the function to call
// a2 : feedback vector
// 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, a0, a1, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// 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) {
// register state
// cp -- context
// a1 -- function
// a2 -- allocation site with elements kind
Register registers[] = {cp, a1, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArrayConstructorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a2, a0};
- 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) {
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- constructor function
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void InternalArrayConstructorDescriptor::Initialize(
+void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a0};
- 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) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void KeyedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a2, // key
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NamedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a2, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallHandlerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // receiver
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a1, // JSFunction
a0, // actual number of arguments
a2, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // callee
a1, // api_function_address
a3, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiAccessorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // callee
a2, // holder
a1, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathRoundVariantDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a1, // math rounding function
a3, // 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
const Register GrowArrayElementsDescriptor::KeyRegister() { return a3; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a3};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a3, a2, a1};
- 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) {
Register registers[] = {cp, a3, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a3};
- 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) {
Register registers[] = {cp, a2, a3, a1};
- 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, a3, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a3};
- 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, a1, a3, a2};
- Representation representations[] = {
- Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
- Representation::Tagged()};
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallConstructDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// a0 : number of arguments
// a1 : the function to call
// a2 : feedback vector
// 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, a0, a1, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// 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) {
// register state
// cp -- context
// a1 -- function
// a2 -- allocation site with elements kind
Register registers[] = {cp, a1, a2};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArrayConstructorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a2, a0};
- 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) {
// register state
// cp -- context
// a0 -- number of arguments
// a1 -- constructor function
Register registers[] = {cp, a1};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void InternalArrayConstructorDescriptor::Initialize(
+void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// stack param count needs (constructor pointer, and single argument)
Register registers[] = {cp, a1, a0};
- 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) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a2, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {cp, a1, a0};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
-void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void KeyedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a2, // key
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NamedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a2, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallHandlerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // receiver
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a1, // JSFunction
a0, // actual number of arguments
a2, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // callee
a1, // api_function_address
a3, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiAccessorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a0, // callee
a2, // holder
a1, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathRoundVariantDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
cp, // context
a1, // math rounding function
a3, // 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
const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; }
-void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewClosureDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rbx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void FastNewContextDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rdi};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void TypeofDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rbx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToNumberDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
// ToNumberStub invokes a function, and therefore needs a context.
Register registers[] = {rsi, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NumberToStringDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void FastCloneShallowArrayDescriptor::Initialize(
+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rax, rbx, rcx};
- 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) {
Register registers[] = {rsi, rax, rbx, rcx, rdx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CreateAllocationSiteDescriptor::Initialize(
+void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rbx, rdx};
- 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) {
Register registers[] = {rsi, rbx, rdx, rdi};
- 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[] = {rsi, rcx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rdi};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallFunctionWithFeedbackDescriptor::Initialize(
+void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rdi, rdx};
- 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[] = {rsi, rdi, rdx, rbx};
- 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) {
// rax : number of arguments
// rbx : feedback vector
// rdx : (only if rbx is not the megamorphic symbol) slot in feedback
// 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[] = {rsi, rax, rdi, rbx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void RegExpConstructResultDescriptor::Initialize(
+void RegExpConstructResultDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rcx, rbx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void TransitionElementsKindDescriptor::Initialize(
+void TransitionElementsKindDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rax, rbx};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void AllocateHeapNumberDescriptor::Initialize(
+void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// rsi -- context
Register registers[] = {rsi};
- data->Initialize(arraysize(registers), registers, nullptr);
+ data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
}
-void ArrayConstructorConstantArgCountDescriptor::Initialize(
+void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state
// rax -- number of arguments
// rdi -- function
// rbx -- allocation site with elements kind
Register registers[] = {rsi, rdi, rbx};
- 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[] = {rsi, rdi, rbx, rax};
- 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) {
// register state
// rsi -- context
// rax -- number of arguments
// rdi -- constructor function
Register registers[] = {rsi, rdi};
- 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[] = {rsi, rdi, rax};
- 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) {
Register registers[] = {rsi, rdx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CompareNilDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ToBooleanDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void BinaryOpDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rdx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void BinaryOpWithAllocationSiteDescriptor::Initialize(
+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rcx, rdx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void StringAddDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {rsi, rdx, rax};
- data->Initialize(arraysize(registers), registers, NULL);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void KeyedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rcx, // key
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // key
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void NamedDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rcx, // name
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // name
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void CallHandlerDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rdx, // receiver
};
- Representation representations[] = {
- Representation::Tagged(), // context
- Representation::Tagged(), // receiver
- };
- data->Initialize(arraysize(registers), registers, representations);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rdi, // JSFunction
rax, // actual number of arguments
rbx, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiFunctionDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rdi, // callee
rdx, // api_function_address
rax, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void ApiAccessorDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rdi, // callee
rcx, // holder
rdx, // 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);
+ data->InitializePlatformSpecific(arraysize(registers), registers);
}
-void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) {
+void MathRoundVariantDescriptor::InitializePlatformSpecific(
+ CallInterfaceDescriptorData* data) {
Register registers[] = {
rsi, // context
rdi, // math rounding function
rdx, // 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
void LowerChange(Node* change) {
// Run the graph reducer with changes lowering on a single node.
- Typer typer(this->isolate(), this->graph(), Handle<Context>());
+ Typer typer(this->isolate(), this->graph(), nullptr, Handle<Context>());
typer.Run();
ChangeLowering change_lowering(&jsgraph);
SelectLowering select_lowering(this->graph(), this->common());
: main_graph_(zone),
main_common_(zone),
main_javascript_(zone),
- main_typer_(isolate, &main_graph_, MaybeHandle<Context>()),
+ main_typer_(isolate, &main_graph_, nullptr, MaybeHandle<Context>()),
main_machine_(zone) {}
Graph main_graph_;
CommonOperatorBuilder main_common_;
simplified(main_zone()),
common(main_zone()),
graph(main_zone()),
- typer(main_isolate(), &graph, MaybeHandle<Context>()),
+ typer(main_isolate(), &graph, nullptr, MaybeHandle<Context>()),
context_node(NULL) {
graph.SetStart(graph.NewNode(common.Start(num_parameters)));
graph.SetEnd(graph.NewNode(common.End(1)));
common(main_zone()),
graph(main_zone()),
javascript(main_zone()),
- typer(isolate, &graph, MaybeHandle<Context>()),
+ typer(isolate, &graph, nullptr, MaybeHandle<Context>()),
jsgraph(isolate, &graph, &common, &javascript, &machine),
maxuint32(Constant<int32_t>(kMaxUInt32)) {
Node* s = graph.NewNode(common.Start(num_parameters));
SimplifiedLoweringTester(MachineType p0 = kMachNone,
MachineType p1 = kMachNone)
: GraphBuilderTester<ReturnType>(p0, p1),
- typer(this->isolate(), this->graph(), MaybeHandle<Context>()),
+ typer(this->isolate(), this->graph(), nullptr, MaybeHandle<Context>()),
javascript(this->zone()),
jsgraph(this->isolate(), this->graph(), this->common(), &javascript,
this->machine()),
explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None(),
Type* p2_type = Type::None())
: GraphAndBuilders(main_zone()),
- typer(main_isolate(), graph(), MaybeHandle<Context>()),
+ typer(main_isolate(), graph(), nullptr, MaybeHandle<Context>()),
javascript(main_zone()),
jsgraph(main_isolate(), graph(), common(), &javascript, machine()) {
start = graph()->NewNode(common()->Start(2));
TypedGraphTest::TypedGraphTest(int num_parameters)
: GraphTest(num_parameters),
- typer_(isolate(), graph(), MaybeHandle<Context>()) {}
+ typer_(isolate(), graph(), nullptr, MaybeHandle<Context>()) {}
TypedGraphTest::~TypedGraphTest() {}