JVM IR: do not clear BindingContext in bytecode tool window

This commit is contained in:
Alexander Udalov
2020-10-28 20:52:34 +01:00
parent 08b761ae7a
commit 0d1bb9acaf
@@ -283,7 +283,7 @@ class KotlinBytecodeToolWindow(private val myProject: Project, private val toolW
fun compileSingleFile(
ktFile: KtFile,
configuration: CompilerConfiguration
initialConfiguration: CompilerConfiguration
): GenerationState? {
val platform = ktFile.platform
if (!platform.isCommon() && !platform.isJvm()) return null
@@ -294,6 +294,10 @@ class KotlinBytecodeToolWindow(private val myProject: Project, private val toolW
val bindingContextForFile = resolutionFacade.analyzeWithAllCompilerChecks(listOf(ktFile)).bindingContext
val configuration = initialConfiguration.copy().apply {
put(JVMConfigurationKeys.DO_NOT_CLEAR_BINDING_CONTEXT, true)
}
val (bindingContext, toProcess) = DebuggerUtils.analyzeInlinedFunctions(
resolutionFacade, ktFile, configuration.getBoolean(CommonConfigurationKeys.DISABLE_INLINE),
bindingContextForFile