Backend: remove codegen factory from generation state
use it explicitly. This is a step in attempt to abstract dependencies on PSI in the GenerationState and related places.
This commit is contained in:
-1
@@ -197,7 +197,6 @@ open class KJvmReplCompilerBase<AnalyzerT : ReplCodeAnalyzerBase>(
|
||||
sourceFiles,
|
||||
compilationState.environment.configuration
|
||||
)
|
||||
.codegenFactory(codegenFactory)
|
||||
.build()
|
||||
|
||||
codegenFactory.generateModule(
|
||||
|
||||
+8
-7
@@ -246,16 +246,17 @@ private fun generate(
|
||||
analysisResult.bindingContext,
|
||||
sourceFiles,
|
||||
kotlinCompilerConfiguration
|
||||
).codegenFactory(
|
||||
if (kotlinCompilerConfiguration.getBoolean(JVMConfigurationKeys.IR))
|
||||
JvmIrCodegenFactory(
|
||||
kotlinCompilerConfiguration,
|
||||
kotlinCompilerConfiguration.get(CLIConfigurationKeys.PHASE_CONFIG),
|
||||
) else DefaultCodegenFactory
|
||||
).diagnosticReporter(
|
||||
diagnosticsReporter
|
||||
).build().also {
|
||||
KotlinCodegenFacade.compileCorrectFiles(it)
|
||||
KotlinCodegenFacade.compileCorrectFiles(
|
||||
it,
|
||||
if (kotlinCompilerConfiguration.getBoolean(JVMConfigurationKeys.IR))
|
||||
JvmIrCodegenFactory(
|
||||
kotlinCompilerConfiguration,
|
||||
kotlinCompilerConfiguration.get(CLIConfigurationKeys.PHASE_CONFIG),
|
||||
) else DefaultCodegenFactory
|
||||
)
|
||||
FirDiagnosticsCompilerResultsReporter.reportToMessageCollector(
|
||||
diagnosticsReporter,
|
||||
messageCollector,
|
||||
|
||||
Reference in New Issue
Block a user