[K2] Remove performanceManager from CompilationContext
This commit is contained in:
+1
-5
@@ -95,8 +95,6 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
buildFile: File?,
|
||||
module: Module,
|
||||
): Boolean {
|
||||
val performanceManager = compilerConfiguration.get(CLIConfigurationKeys.PERF_MANAGER)
|
||||
|
||||
val targetIds = compilerConfiguration.get(JVMConfigurationKeys.MODULES)?.map(::TargetId)
|
||||
val incrementalComponents = compilerConfiguration.get(JVMConfigurationKeys.INCREMENTAL_COMPILATION_COMPONENTS)
|
||||
|
||||
@@ -111,7 +109,6 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
messageCollector,
|
||||
moduleConfiguration.getBoolean(CLIConfigurationKeys.RENDER_DIAGNOSTIC_INTERNAL_NAME),
|
||||
moduleConfiguration,
|
||||
performanceManager,
|
||||
targetIds,
|
||||
incrementalComponents,
|
||||
extensionRegistrars = FirExtensionRegistrar.getInstances(project),
|
||||
@@ -259,7 +256,7 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||
|
||||
val generationState = generateCodeFromIr(
|
||||
irInput, ModuleCompilerEnvironment(projectEnvironment, diagnosticsReporter), performanceManager
|
||||
irInput, ModuleCompilerEnvironment(projectEnvironment, diagnosticsReporter)
|
||||
).generationState
|
||||
|
||||
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||
@@ -284,7 +281,6 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
override val messageCollector: MessageCollector,
|
||||
val renderDiagnosticName: Boolean,
|
||||
override val configuration: CompilerConfiguration,
|
||||
val performanceManager: CommonCompilerPerformanceManager?,
|
||||
override val targetIds: List<TargetId>?,
|
||||
override val incrementalComponents: IncrementalCompilationComponents?,
|
||||
override val extensionRegistrars: List<FirExtensionRegistrar>,
|
||||
|
||||
@@ -117,7 +117,6 @@ fun compileModulesUsingFrontendIrAndLightTree(
|
||||
emptyList(),
|
||||
null,
|
||||
diagnosticsReporter,
|
||||
performanceManager
|
||||
)
|
||||
|
||||
if (!checkKotlinPackageUsageForLightTree(moduleConfiguration, analysisResults.outputs.flatMap { it.fir })) {
|
||||
@@ -136,7 +135,7 @@ fun compileModulesUsingFrontendIrAndLightTree(
|
||||
val compilerEnvironment = ModuleCompilerEnvironment(projectEnvironment, diagnosticsReporter)
|
||||
val irInput = convertAnalyzedFirToIr(compilerInput, analysisResults, compilerEnvironment)
|
||||
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment, performanceManager)
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment)
|
||||
|
||||
diagnosticsReporter.reportToMessageCollector(
|
||||
messageCollector, moduleConfiguration.getBoolean(CLIConfigurationKeys.RENDER_DIAGNOSTIC_INTERNAL_NAME)
|
||||
@@ -203,8 +202,7 @@ fun FirResult.convertToIrAndActualizeForJvm(
|
||||
|
||||
fun generateCodeFromIr(
|
||||
input: ModuleCompilerIrBackendInput,
|
||||
environment: ModuleCompilerEnvironment,
|
||||
performanceManager: CommonCompilerPerformanceManager?
|
||||
environment: ModuleCompilerEnvironment
|
||||
): ModuleCompilerOutput {
|
||||
// IR
|
||||
val codegenFactory = JvmIrCodegenFactory(
|
||||
@@ -232,6 +230,7 @@ fun generateCodeFromIr(
|
||||
environment.diagnosticsReporter
|
||||
).build()
|
||||
|
||||
val performanceManager = input.configuration[CLIConfigurationKeys.PERF_MANAGER]
|
||||
performanceManager?.notifyGenerationStarted()
|
||||
performanceManager?.notifyIRLoweringStarted()
|
||||
generationState.beforeCompile()
|
||||
@@ -265,10 +264,10 @@ fun compileModuleToAnalyzedFir(
|
||||
previousStepsSymbolProviders: List<FirSymbolProvider>,
|
||||
incrementalExcludesScope: AbstractProjectFileSearchScope?,
|
||||
diagnosticsReporter: BaseDiagnosticsCollector,
|
||||
performanceManager: CommonCompilerPerformanceManager?
|
||||
): FirResult {
|
||||
performanceManager?.notifyAnalysisStarted()
|
||||
val moduleConfiguration = input.configuration
|
||||
val performanceManager = moduleConfiguration[CLIConfigurationKeys.PERF_MANAGER]
|
||||
performanceManager?.notifyAnalysisStarted()
|
||||
|
||||
var librariesScope = projectEnvironment.getSearchScopeForProjectLibraries()
|
||||
val rootModuleName = input.targetId.name
|
||||
|
||||
+1
-2
@@ -220,7 +220,6 @@ open class IncrementalFirJvmCompilerRunner(
|
||||
emptyList(),
|
||||
incrementalExcludesScope,
|
||||
diagnosticsReporter,
|
||||
performanceManager
|
||||
)
|
||||
|
||||
// TODO: consider what to do if many compilations find a main class
|
||||
@@ -279,7 +278,7 @@ open class IncrementalFirJvmCompilerRunner(
|
||||
irActualizedResult
|
||||
)
|
||||
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment, performanceManager)
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment)
|
||||
|
||||
diagnosticsReporter.reportToMessageCollector(messageCollector, renderDiagnosticName)
|
||||
|
||||
|
||||
+1
-1
@@ -434,7 +434,7 @@ private fun doCompileWithK2(
|
||||
|
||||
val irInput = convertAnalyzedFirToIr(compilerInput, analysisResults, compilerEnvironment)
|
||||
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment, null)
|
||||
val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment)
|
||||
|
||||
diagnosticsReporter.reportToMessageCollector(messageCollector, renderDiagnosticName)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user