[analysis api] move analysis session classes to separate packages, use KtAnalysisApiInternals to mark internal API

This commit is contained in:
Ilya Kirillov
2022-05-10 17:29:32 +02:00
parent eb9085c083
commit b5ad6f5db4
228 changed files with 521 additions and 534 deletions
@@ -1,43 +1,43 @@
FILE: WithValidityAssertion.kt
public abstract interface ValidityToken : R|kotlin/Any| {
public abstract interface KtLifetimeToken : R|kotlin/Any| {
public abstract fun assertIsValid(): R|kotlin/Unit|
}
public abstract interface ValidityTokenOwner : R|kotlin/Any| {
public abstract val token: R|ValidityToken|
public get(): R|ValidityToken|
public abstract interface KtLifetimeTokenOwner : R|kotlin/Any| {
public abstract val token: R|KtLifetimeToken|
public get(): R|KtLifetimeToken|
}
public final inline fun R|ValidityTokenOwner|.assertIsValid(): R|kotlin/Unit| {
this@R|/assertIsValid|.R|/ValidityTokenOwner.token|.R|/ValidityToken.assertIsValid|()
public final inline fun R|KtLifetimeTokenOwner|.assertIsValid(): R|kotlin/Unit| {
this@R|/assertIsValid|.R|/KtLifetimeTokenOwner.token|.R|/KtLifetimeToken.assertIsValid|()
}
public final inline fun <R> R|ValidityTokenOwner|.withValidityAssertion(action: R|() -> R|): R|R| {
public final inline fun <R> R|KtLifetimeTokenOwner|.withValidityAssertion(action: R|() -> R|): R|R| {
this@R|/withValidityAssertion|.R|/assertIsValid|()
^withValidityAssertion R|<local>/action|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()
}
public final class ValidityAwareCachedValue<T> : R|kotlin/properties/ReadOnlyProperty<kotlin/Any, T>| {
public constructor<T>(token: R|ValidityToken|, init: R|() -> T|): R|ValidityAwareCachedValue<T>| {
public constructor<T>(token: R|KtLifetimeToken|, init: R|() -> T|): R|ValidityAwareCachedValue<T>| {
super<R|kotlin/Any|>()
}
private final val token: R|ValidityToken| = R|<local>/token|
private get(): R|ValidityToken|
private final val token: R|KtLifetimeToken| = R|<local>/token|
private get(): R|KtLifetimeToken|
private final val lazyValue: R|kotlin/Lazy<T>| = R|kotlin/lazy|<R|T|>(Q|kotlin/LazyThreadSafetyMode|.R|kotlin/LazyThreadSafetyMode.PUBLICATION|, R|<local>/init|)
private get(): R|kotlin/Lazy<T>|
@R|kotlin/Suppress|(names = vararg(String(UNCHECKED_CAST))) public final override operator fun getValue(thisRef: R|kotlin/Any|, property: R|kotlin/reflect/KProperty<*>|): R|T| {
this@R|/ValidityAwareCachedValue|.R|/ValidityAwareCachedValue.token|.R|/ValidityToken.assertIsValid|()
this@R|/ValidityAwareCachedValue|.R|/ValidityAwareCachedValue.token|.R|/KtLifetimeToken.assertIsValid|()
^getValue this@R|/ValidityAwareCachedValue|.R|/ValidityAwareCachedValue.lazyValue|.R|SubstitutionOverride<kotlin/Lazy.value: R|T|>|
}
}
internal final fun <T> R|ValidityTokenOwner|.cached(init: R|() -> T|): R|ValidityAwareCachedValue<T>| {
^cached R|/ValidityAwareCachedValue.ValidityAwareCachedValue|<R|T|>(this@R|/cached|.R|/ValidityTokenOwner.token|, R|<local>/init|)
internal final fun <T> R|KtLifetimeTokenOwner|.cached(init: R|() -> T|): R|ValidityAwareCachedValue<T>| {
^cached R|/ValidityAwareCachedValue.ValidityAwareCachedValue|<R|T|>(this@R|/cached|.R|/KtLifetimeTokenOwner.token|, R|<local>/init|)
}
public final typealias KtScopeNameFilter = R|(kotlin/String) -> kotlin/Boolean|
public abstract class KtFirNonStarImportingScope : R|ValidityTokenOwner| {
public constructor(firScope: R|FirScope|, builder: R|KtSymbolByFirBuilder|, token: R|ValidityToken|): R|KtFirNonStarImportingScope| {
public abstract class KtFirNonStarImportingScope : R|KtLifetimeTokenOwner| {
public constructor(firScope: R|FirScope|, builder: R|KtSymbolByFirBuilder|, token: R|KtLifetimeToken|): R|KtFirNonStarImportingScope| {
super<R|kotlin/Any|>()
}
@@ -47,8 +47,8 @@ FILE: WithValidityAssertion.kt
private final val builder: R|KtSymbolByFirBuilder| = R|<local>/builder|
private get(): R|KtSymbolByFirBuilder|
public open override val token: R|ValidityToken| = R|<local>/token|
public get(): R|ValidityToken|
public open override val token: R|KtLifetimeToken| = R|<local>/token|
public get(): R|KtLifetimeToken|
private final val imports: R|kotlin/collections/List<kotlin/String>|by this@R|/KtFirNonStarImportingScope|.R|/cached|<R|kotlin/collections/List<kotlin/String>|>(<L> = cached@fun <anonymous>(): R|kotlin/collections/List<kotlin/String>| <inline=NoInline> {
^ R|kotlin/collections/buildList|<R|kotlin/String|>(<L> = buildList@fun R|kotlin/collections/MutableList<kotlin/String>|.<anonymous>(): R|kotlin/Unit| <inline=Inline, kind=EXACTLY_ONCE> {
@@ -1,25 +1,25 @@
import kotlin.reflect.KProperty
import kotlin.properties.ReadOnlyProperty
interface ValidityToken {
interface KtLifetimeToken {
fun assertIsValid()
}
interface ValidityTokenOwner {
val token: ValidityToken
interface KtLifetimeTokenOwner {
val token: KtLifetimeToken
}
<!NOTHING_TO_INLINE!>inline<!> fun ValidityTokenOwner.assertIsValid() {
<!NOTHING_TO_INLINE!>inline<!> fun KtLifetimeTokenOwner.assertIsValid() {
token.assertIsValid()
}
inline fun <R> ValidityTokenOwner.withValidityAssertion(action: () -> R): R {
inline fun <R> KtLifetimeTokenOwner.withValidityAssertion(action: () -> R): R {
assertIsValid()
return action()
}
class ValidityAwareCachedValue<T>(
private val token: ValidityToken,
private val token: KtLifetimeToken,
init: () -> T
) : ReadOnlyProperty<Any, T> {
private val lazyValue = lazy(LazyThreadSafetyMode.PUBLICATION, init)
@@ -31,15 +31,15 @@ class ValidityAwareCachedValue<T>(
}
}
internal fun <T> ValidityTokenOwner.cached(init: () -> T) = ValidityAwareCachedValue(token, init)
internal fun <T> KtLifetimeTokenOwner.cached(init: () -> T) = ValidityAwareCachedValue(token, init)
public typealias KtScopeNameFilter = (String) -> Boolean
abstract class KtFirNonStarImportingScope(
private val firScope: FirScope,
private val builder: KtSymbolByFirBuilder,
override val token: ValidityToken,
) : ValidityTokenOwner {
override val token: KtLifetimeToken,
) : KtLifetimeTokenOwner {
private val imports: List<String> by cached {
buildList {
getCallableNames().forEach {