From 8a15106b341137cd584e7185a4ecef110cb0b322 Mon Sep 17 00:00:00 2001 From: Ivan Kochurkin Date: Thu, 28 Mar 2024 20:55:26 +0100 Subject: [PATCH] [FIR2IR] Rename `fir2IrResultPostCompute` to `irModuleFragmentPostCompute` and simplify it The first parameter `ModuleCompilerAnalyzedOutput` is actually unused --- .../src/org/jetbrains/kotlin/cli/js/klib/compilerPipeline.kt | 2 +- .../src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/compilerPipeline.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/compilerPipeline.kt index 0e532c4fecbec..0d7bf0f5de19b 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/compilerPipeline.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/compilerPipeline.kt @@ -249,7 +249,7 @@ fun transformFirToIr( visibilityConverter = Fir2IrVisibilityConverter.Default, kotlinBuiltIns = builtInsModule ?: DefaultBuiltIns.Instance, actualizerTypeContextProvider = ::IrTypeSystemContextImpl - ) { _, irModuleFragment -> + ) { irModuleFragment -> (irModuleFragment.descriptor as? FirModuleDescriptor)?.let { it.allDependencyModules = librariesDescriptors } }.also { performanceManager?.notifyIRTranslationFinished() diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt index 9cc6b8758421e..48a32454544e4 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt @@ -73,7 +73,7 @@ fun FirResult.convertToIrAndActualize( visibilityConverter: Fir2IrVisibilityConverter, kotlinBuiltIns: KotlinBuiltIns, actualizerTypeContextProvider: (IrBuiltIns) -> IrTypeSystemContext, - fir2IrResultPostCompute: (ModuleCompilerAnalyzedOutput, IrModuleFragment) -> Unit = { _, _ -> }, + irModuleFragmentPostCompute: (IrModuleFragment) -> Unit = { _ -> }, ): Fir2IrActualizedResult { require(outputs.isNotEmpty()) { "No modules found" } @@ -122,7 +122,7 @@ fun FirResult.convertToIrAndActualize( } val irModuleFragment = Fir2IrConverter.generateIrModuleFragment(componentsStorage, firOutput.fir).also { - fir2IrResultPostCompute(firOutput, it) + irModuleFragmentPostCompute(it) } if (isMainOutput) {