[Commonizer] Ignore CallableDescriptor.hasSynthesizedParameterNames attribute

This commit is contained in:
Dmitriy Dolovov
2020-07-10 21:01:44 +07:00
parent 100a6f70ca
commit 02f08b16d6
9 changed files with 0 additions and 17 deletions
@@ -113,7 +113,6 @@ private fun CirClassConstructor.buildDescriptor(
constructorDescriptor.isActual = isActual constructorDescriptor.isActual = isActual
constructorDescriptor.setHasStableParameterNames(hasStableParameterNames) constructorDescriptor.setHasStableParameterNames(hasStableParameterNames)
constructorDescriptor.setHasSynthesizedParameterNames(hasSynthesizedParameterNames)
val classTypeParameters = containingDeclaration.declaredTypeParameters val classTypeParameters = containingDeclaration.declaredTypeParameters
val (constructorTypeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( val (constructorTypeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver(
@@ -63,7 +63,6 @@ private fun CirFunction.buildDescriptor(
functionDescriptor.isActual = isActual functionDescriptor.isActual = isActual
functionDescriptor.setHasStableParameterNames(hasStableParameterNames) functionDescriptor.setHasStableParameterNames(hasStableParameterNames)
functionDescriptor.setHasSynthesizedParameterNames(hasSynthesizedParameterNames)
val (typeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver( val (typeParameters, typeParameterResolver) = typeParameters.buildDescriptorsAndTypeParameterResolver(
targetComponents, targetComponents,
@@ -54,7 +54,6 @@ interface CirHasTypeParameters {
interface CirCallableMemberWithParameters { interface CirCallableMemberWithParameters {
val valueParameters: List<CirValueParameter> val valueParameters: List<CirValueParameter>
val hasStableParameterNames: Boolean val hasStableParameterNames: Boolean
val hasSynthesizedParameterNames: Boolean
} }
/** /**
@@ -22,7 +22,6 @@ object CirClassConstructorFactory {
containingClassDetails = CirContainingClassDetailsFactory.create(source), containingClassDetails = CirContainingClassDetailsFactory.create(source),
valueParameters = source.valueParameters.map(CirValueParameterFactory::create), valueParameters = source.valueParameters.map(CirValueParameterFactory::create),
hasStableParameterNames = source.hasStableParameterNames(), hasStableParameterNames = source.hasStableParameterNames(),
hasSynthesizedParameterNames = source.hasSynthesizedParameterNames(),
isPrimary = source.isPrimary, isPrimary = source.isPrimary,
kind = source.kind kind = source.kind
) )
@@ -35,7 +34,6 @@ object CirClassConstructorFactory {
containingClassDetails: CirContainingClassDetails, containingClassDetails: CirContainingClassDetails,
valueParameters: List<CirValueParameter>, valueParameters: List<CirValueParameter>,
hasStableParameterNames: Boolean, hasStableParameterNames: Boolean,
hasSynthesizedParameterNames: Boolean,
isPrimary: Boolean, isPrimary: Boolean,
kind: CallableMemberDescriptor.Kind kind: CallableMemberDescriptor.Kind
): CirClassConstructor { ): CirClassConstructor {
@@ -46,7 +44,6 @@ object CirClassConstructorFactory {
containingClassDetails = containingClassDetails, containingClassDetails = containingClassDetails,
valueParameters = valueParameters, valueParameters = valueParameters,
hasStableParameterNames = hasStableParameterNames, hasStableParameterNames = hasStableParameterNames,
hasSynthesizedParameterNames = hasSynthesizedParameterNames,
isPrimary = isPrimary, isPrimary = isPrimary,
kind = kind kind = kind
) )
@@ -21,7 +21,6 @@ object CirFunctionFactory {
containingClassDetails = CirContainingClassDetailsFactory.create(source), containingClassDetails = CirContainingClassDetailsFactory.create(source),
valueParameters = source.valueParameters.map(CirValueParameterFactory::create), valueParameters = source.valueParameters.map(CirValueParameterFactory::create),
hasStableParameterNames = source.hasStableParameterNames(), hasStableParameterNames = source.hasStableParameterNames(),
hasSynthesizedParameterNames = source.hasSynthesizedParameterNames(),
extensionReceiver = source.extensionReceiverParameter?.let(CirExtensionReceiverFactory::create), extensionReceiver = source.extensionReceiverParameter?.let(CirExtensionReceiverFactory::create),
returnType = CirTypeFactory.create(source.returnType!!), returnType = CirTypeFactory.create(source.returnType!!),
kind = source.kind, kind = source.kind,
@@ -38,7 +37,6 @@ object CirFunctionFactory {
containingClassDetails: CirContainingClassDetails?, containingClassDetails: CirContainingClassDetails?,
valueParameters: List<CirValueParameter>, valueParameters: List<CirValueParameter>,
hasStableParameterNames: Boolean, hasStableParameterNames: Boolean,
hasSynthesizedParameterNames: Boolean,
extensionReceiver: CirExtensionReceiver?, extensionReceiver: CirExtensionReceiver?,
returnType: CirType, returnType: CirType,
kind: CallableMemberDescriptor.Kind, kind: CallableMemberDescriptor.Kind,
@@ -53,7 +51,6 @@ object CirFunctionFactory {
containingClassDetails = containingClassDetails, containingClassDetails = containingClassDetails,
valueParameters = valueParameters, valueParameters = valueParameters,
hasStableParameterNames = hasStableParameterNames, hasStableParameterNames = hasStableParameterNames,
hasSynthesizedParameterNames = hasSynthesizedParameterNames,
extensionReceiver = extensionReceiver, extensionReceiver = extensionReceiver,
returnType = returnType, returnType = returnType,
kind = kind, kind = kind,
@@ -16,7 +16,6 @@ data class CirClassConstructorImpl(
override val containingClassDetails: CirContainingClassDetails, override val containingClassDetails: CirContainingClassDetails,
override val valueParameters: List<CirValueParameter>, override val valueParameters: List<CirValueParameter>,
override val hasStableParameterNames: Boolean, override val hasStableParameterNames: Boolean,
override val hasSynthesizedParameterNames: Boolean,
override val isPrimary: Boolean, override val isPrimary: Boolean,
override val kind: CallableMemberDescriptor.Kind override val kind: CallableMemberDescriptor.Kind
) : CirClassConstructor ) : CirClassConstructor
@@ -20,7 +20,6 @@ data class CirFunctionImpl(
override val containingClassDetails: CirContainingClassDetails?, override val containingClassDetails: CirContainingClassDetails?,
override val valueParameters: List<CirValueParameter>, override val valueParameters: List<CirValueParameter>,
override val hasStableParameterNames: Boolean, override val hasStableParameterNames: Boolean,
override val hasSynthesizedParameterNames: Boolean,
override val extensionReceiver: CirExtensionReceiver?, override val extensionReceiver: CirExtensionReceiver?,
override val returnType: CirType, override val returnType: CirType,
override val kind: CallableMemberDescriptor.Kind, override val kind: CallableMemberDescriptor.Kind,
@@ -19,7 +19,6 @@ class ClassConstructorCommonizer(cache: CirClassifiersCache) : AbstractStandardC
private val typeParameters = TypeParameterListCommonizer(cache) private val typeParameters = TypeParameterListCommonizer(cache)
private val valueParameters = ValueParameterListCommonizer(cache) private val valueParameters = ValueParameterListCommonizer(cache)
private var hasStableParameterNames = true private var hasStableParameterNames = true
private var hasSynthesizedParameterNames = false
override fun commonizationResult() = CirClassConstructorFactory.create( override fun commonizationResult() = CirClassConstructorFactory.create(
annotations = emptyList(), annotations = emptyList(),
@@ -28,7 +27,6 @@ class ClassConstructorCommonizer(cache: CirClassifiersCache) : AbstractStandardC
containingClassDetails = CirContainingClassDetailsFactory.DOES_NOT_MATTER, containingClassDetails = CirContainingClassDetailsFactory.DOES_NOT_MATTER,
valueParameters = valueParameters.result, valueParameters = valueParameters.result,
hasStableParameterNames = hasStableParameterNames, hasStableParameterNames = hasStableParameterNames,
hasSynthesizedParameterNames = hasSynthesizedParameterNames,
isPrimary = isPrimary, isPrimary = isPrimary,
kind = kind kind = kind
) )
@@ -49,7 +47,6 @@ class ClassConstructorCommonizer(cache: CirClassifiersCache) : AbstractStandardC
if (result) { if (result) {
hasStableParameterNames = hasStableParameterNames && next.hasStableParameterNames hasStableParameterNames = hasStableParameterNames && next.hasStableParameterNames
hasSynthesizedParameterNames = hasSynthesizedParameterNames || next.hasSynthesizedParameterNames
} }
return result return result
@@ -14,7 +14,6 @@ class FunctionCommonizer(cache: CirClassifiersCache) : AbstractFunctionOrPropert
private val modifiers = FunctionModifiersCommonizer() private val modifiers = FunctionModifiersCommonizer()
private val valueParameters = ValueParameterListCommonizer(cache) private val valueParameters = ValueParameterListCommonizer(cache)
private var hasStableParameterNames = true private var hasStableParameterNames = true
private var hasSynthesizedParameterNames = false
override fun commonizationResult() = CirFunctionFactory.create( override fun commonizationResult() = CirFunctionFactory.create(
annotations = annotations.result, annotations = annotations.result,
@@ -25,7 +24,6 @@ class FunctionCommonizer(cache: CirClassifiersCache) : AbstractFunctionOrPropert
containingClassDetails = null, containingClassDetails = null,
valueParameters = valueParameters.result, valueParameters = valueParameters.result,
hasStableParameterNames = hasStableParameterNames, hasStableParameterNames = hasStableParameterNames,
hasSynthesizedParameterNames = hasSynthesizedParameterNames,
extensionReceiver = extensionReceiver.result, extensionReceiver = extensionReceiver.result,
returnType = returnType.result, returnType = returnType.result,
kind = kind, kind = kind,
@@ -40,7 +38,6 @@ class FunctionCommonizer(cache: CirClassifiersCache) : AbstractFunctionOrPropert
if (result) { if (result) {
hasStableParameterNames = hasStableParameterNames && next.hasStableParameterNames hasStableParameterNames = hasStableParameterNames && next.hasStableParameterNames
hasSynthesizedParameterNames = hasSynthesizedParameterNames || next.hasSynthesizedParameterNames
} }
return result return result