diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/CompilerPhase.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/CompilerPhase.kt index e44f85ac491..b957979b9d1 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/CompilerPhase.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/CompilerPhase.kt @@ -5,7 +5,7 @@ package org.jetbrains.kotlin.backend.common.phaser -import org.jetbrains.kotlin.backend.common.CommonBackendContext +import org.jetbrains.kotlin.backend.common.LoggingContext import kotlin.system.measureTimeMillis class PhaserState( @@ -27,7 +27,7 @@ inline fun PhaserState.downlevel(nlevels: Int, block: () -> R): R { return result } -interface CompilerPhase { +interface CompilerPhase { fun invoke(phaseConfig: PhaseConfigurationService, phaserState: PhaserState, context: Context, input: Input): Output fun getNamedSubphases(startDepth: Int = 0): List>> = emptyList() @@ -36,13 +36,13 @@ interface CompilerPhase { val stickyPostconditions: Set> get() = emptySet() } -fun CompilerPhase.invokeToplevel( +fun CompilerPhase.invokeToplevel( phaseConfig: PhaseConfig, context: Context, input: Input ): Output = invoke(phaseConfig, PhaserState(), context, input) -interface SameTypeCompilerPhase : CompilerPhase +interface SameTypeCompilerPhase : CompilerPhase // A failing checker should just throw an exception. typealias Checker = (Data) -> Unit @@ -66,7 +66,7 @@ infix operator fun Action.plus(other: Action( +class NamedCompilerPhase( val name: String, val description: String, val prerequisite: Set> = emptySet(),