[IR] Remove files parameter from IrModuleFragmentImpl

This commit removes the default parameter in constructor,
as well as custom logic in this class, which would
make it harder for its subsequent auto-generation.

^KT-65773 In Progress
This commit is contained in:
Wojciech Litewka
2024-02-13 21:41:27 +01:00
committed by Space Team
parent 83bc12949b
commit 2a5b4ae652
6 changed files with 13 additions and 13 deletions
@@ -128,7 +128,7 @@ open class JvmIrCodegenFactory(
val extensions: JvmGeneratorExtensions,
val backendExtension: JvmBackendExtension,
val pluginContext: IrPluginContext?,
val notifyCodegenStart: () -> Unit
val notifyCodegenStart: () -> Unit,
) : CodegenFactory.BackendInput
private data class JvmIrCodegenInput(
@@ -317,11 +317,11 @@ open class JvmIrCodegenFactory(
val moduleChunk = sourceFiles.toSet()
val wholeModule = wholeBackendInput.irModuleFragment
return wholeBackendInput.copy(
IrModuleFragmentImpl(wholeModule.descriptor, wholeModule.irBuiltins, wholeModule.files.filter { file ->
file.getKtFile() in moduleChunk
})
)
val moduleCopy = IrModuleFragmentImpl(wholeModule.descriptor, wholeModule.irBuiltins)
wholeModule.files.filterTo(moduleCopy.files) { file ->
file.getKtFile() in moduleChunk
}
return wholeBackendInput.copy(moduleCopy)
}
override fun invokeLowerings(state: GenerationState, input: CodegenFactory.BackendInput): CodegenFactory.CodegenInput {
@@ -428,7 +428,7 @@ open class JvmIrCodegenFactory(
extensions: JvmGeneratorExtensions,
backendExtension: JvmBackendExtension,
irPluginContext: IrPluginContext,
notifyCodegenStart: () -> Unit = {}
notifyCodegenStart: () -> Unit = {},
) {
generateModule(
state,