[kotlin] Provide CFG facade for the extract function refactoring

This is the first implementation of a control flow graph facade for the
extract function IDE refactoring. The exact contents of
'KtDataFlowExitPointSnapshot' will be refined later.

^KT-65762 Fixed
This commit is contained in:
Yan Zhulanow
2024-03-05 01:44:32 +09:00
committed by Space Team
parent b032e647f7
commit 0fec50135f
165 changed files with 4351 additions and 1 deletions
@@ -64,6 +64,7 @@ class KtFe10AnalysisSession(
override val symbolProviderByJavaPsiImpl: KtSymbolProviderByJavaPsi = KtFe10SymbolProviderByJavaPsi(this)
override val resolveExtensionInfoProviderImpl: KtResolveExtensionInfoProvider = KtFe10ResolveExtensionInfoProvider(this)
override val compilerFacilityImpl: KtCompilerFacility = KtFe10CompilerFacility(this)
override val dataFlowInfoProviderImpl: KtDataFlowInfoProvider = KtFe10DataFlowInfoProvider(this)
override val metadataCalculatorImpl: KtMetadataCalculator
get() = throw NotSupportedForK1Exception()
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.descriptors.components
import org.jetbrains.kotlin.analysis.api.KtAnalysisNonPublicApi
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
import org.jetbrains.kotlin.analysis.api.components.KtDataFlowExitPointSnapshot
import org.jetbrains.kotlin.analysis.api.components.KtDataFlowInfoProvider
import org.jetbrains.kotlin.psi.KtExpression
@OptIn(KtAnalysisNonPublicApi::class)
internal class KtFe10DataFlowInfoProvider(override val analysisSession: KtAnalysisSession) : KtDataFlowInfoProvider() {
override fun getExitPointSnapshot(statements: List<KtExpression>): KtDataFlowExitPointSnapshot {
throw NotImplementedError("Method is not implemented for FE 1.0")
}
}