From 5f4a5608991be4c3602467139fb9cb86a5e37016 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 22 Feb 2023 13:23:56 +0100 Subject: [PATCH] Fix binary compatibility with AS 222/223 in PhaseConfig (cherry picked from commit a419120cbd6050417945a0e9f411213debd15b77) --- .../backend/common/phaser/PhaseConfig.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/PhaseConfig.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/PhaseConfig.kt index c3ba99bc077..bbbd9db8bb3 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/PhaseConfig.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/PhaseConfig.kt @@ -48,6 +48,27 @@ class PhaseConfig( override val checkConditions: Boolean = false, override val checkStickyConditions: Boolean = false ) : PhaseConfigurationService { + @Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN) + constructor( + compoundPhase: CompilerPhase<*, *, *>, + phases: Map = compoundPhase.toPhaseMap(), + initiallyEnabled: Set = phases.values.toSet(), + verbose: Set = emptySet(), + toDumpStateBefore: Set = emptySet(), + toDumpStateAfter: Set = emptySet(), + dumpToDirectory: String? = null, + dumpOnlyFqName: String? = null, + toValidateStateBefore: Set = emptySet(), + toValidateStateAfter: Set = emptySet(), + @Suppress("UNUSED_PARAMETER") namesOfElementsExcludedFromDumping: Set = emptySet(), + needProfiling: Boolean = false, + checkConditions: Boolean = false, + checkStickyConditions: Boolean = false, + ) : this( + compoundPhase, phases, initiallyEnabled, verbose, toDumpStateBefore, toDumpStateAfter, dumpToDirectory, dumpOnlyFqName, + toValidateStateBefore, toValidateStateAfter, needProfiling, checkConditions, checkStickyConditions + ) + fun toBuilder() = PhaseConfigBuilder(compoundPhase).also { it.enabled.addAll(initiallyEnabled) it.verbose.addAll(verbose)