[Analysis API] cleanup code
This commit is contained in:
+2
-4
@@ -589,10 +589,8 @@ internal class KtSymbolByFirBuilder constructor(
|
||||
}
|
||||
|
||||
|
||||
private class BuilderCache<From, To : Any> private constructor(
|
||||
private val cache: ConcurrentMap<From, To>,
|
||||
) {
|
||||
constructor() : this(ContainerUtil.createConcurrentSoftMap())
|
||||
private class BuilderCache<From, To : Any> {
|
||||
private val cache = ContainerUtil.createConcurrentSoftMap<From, To>()
|
||||
|
||||
inline fun <reified S : To> cache(key: From, calculation: () -> S): S {
|
||||
val value = cache.getOrPut(key, calculation)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ internal open class KtFirDelegatingScope(
|
||||
getPossibleCallableNames() + getPossibleClassifierNames()
|
||||
}
|
||||
|
||||
override fun getAllPossibleNames(): Set<Name> = withValidityAssertion { withValidityAssertion { allNamesCached } }
|
||||
override fun getAllPossibleNames(): Set<Name> = withValidityAssertion { allNamesCached }
|
||||
|
||||
override fun getPossibleCallableNames(): Set<Name> = withValidityAssertion {
|
||||
firScope.getCallableNames()
|
||||
|
||||
Reference in New Issue
Block a user