Backend: remove psi files from generation state
pass them explicitly to all destinations. This is a step in attempt to abstract dependencies on PSI in the GenerationState and related places.
This commit is contained in:
+3
-3
@@ -308,8 +308,7 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
|
||||
val generationState = GenerationState.Builder(
|
||||
(projectEnvironment as VfsBasedProjectEnvironment).project, ClassBuilderFactories.BINARIES,
|
||||
moduleFragment.descriptor, dummyBindingContext, ktFiles,
|
||||
moduleConfiguration
|
||||
moduleFragment.descriptor, dummyBindingContext, moduleConfiguration
|
||||
).withModule(
|
||||
module
|
||||
).onIndependentPartCompilationEnd(
|
||||
@@ -326,8 +325,9 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
|
||||
performanceManager?.notifyIRLoweringStarted()
|
||||
generationState.beforeCompile()
|
||||
generationState.oldBEInitTrace(ktFiles)
|
||||
codegenFactory.generateModuleInFrontendIRMode(
|
||||
generationState, moduleFragment, symbolTable, extensions, FirJvmBackendExtension(session, components)
|
||||
generationState, ktFiles, moduleFragment, symbolTable, extensions, FirJvmBackendExtension(session, components)
|
||||
) {
|
||||
performanceManager?.notifyIRLoweringFinished()
|
||||
performanceManager?.notifyIRGenerationStarted()
|
||||
|
||||
+1
-1
@@ -318,7 +318,6 @@ object KotlinToJVMBytecodeCompiler {
|
||||
ClassBuilderFactories.BINARIES,
|
||||
result.moduleDescriptor,
|
||||
result.bindingContext,
|
||||
sourceFiles,
|
||||
configuration
|
||||
)
|
||||
.withModule(module)
|
||||
@@ -331,6 +330,7 @@ object KotlinToJVMBytecodeCompiler {
|
||||
performanceManager?.notifyGenerationStarted()
|
||||
|
||||
state.beforeCompile()
|
||||
state.oldBEInitTrace(sourceFiles)
|
||||
|
||||
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||
|
||||
|
||||
@@ -220,8 +220,7 @@ fun generateCodeFromIr(
|
||||
|
||||
val generationState = GenerationState.Builder(
|
||||
(environment.projectEnvironment as VfsBasedProjectEnvironment).project, ClassBuilderFactories.BINARIES,
|
||||
input.irModuleFragment.descriptor, dummyBindingContext, emptyList()/* !! */,
|
||||
input.configuration
|
||||
input.irModuleFragment.descriptor, dummyBindingContext, input.configuration
|
||||
).targetId(
|
||||
input.targetId
|
||||
).moduleName(
|
||||
@@ -242,7 +241,7 @@ fun generateCodeFromIr(
|
||||
|
||||
generationState.beforeCompile()
|
||||
codegenFactory.generateModuleInFrontendIRMode(
|
||||
generationState, input.irModuleFragment, input.symbolTable, input.extensions,
|
||||
generationState, emptyList() /* !! */, input.irModuleFragment, input.symbolTable, input.extensions,
|
||||
FirJvmBackendExtension(input.firSession, input.components)
|
||||
) {
|
||||
performanceManager?.notifyIRLoweringFinished()
|
||||
|
||||
Reference in New Issue
Block a user