FIR ScopeSession: use HashMap instead of LinkedHashMap
This commit is contained in:
@@ -32,10 +32,10 @@ fun lookupSuperTypes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ScopeSession {
|
class ScopeSession {
|
||||||
private val scopes = mutableMapOf<FirClassifierSymbol<*>, MutableMap<ScopeSessionKey<*>, FirScope>>()
|
private val scopes = hashMapOf<FirClassifierSymbol<*>, HashMap<ScopeSessionKey<*>, FirScope>>()
|
||||||
fun <T : FirScope> getOrBuild(symbol: FirClassifierSymbol<*>, key: ScopeSessionKey<T>, build: () -> T): T {
|
fun <T : FirScope> getOrBuild(symbol: FirClassifierSymbol<*>, key: ScopeSessionKey<T>, build: () -> T): T {
|
||||||
return scopes.getOrPut(symbol) {
|
return scopes.getOrPut(symbol) {
|
||||||
mutableMapOf()
|
hashMapOf()
|
||||||
}.getOrPut(key) {
|
}.getOrPut(key) {
|
||||||
build()
|
build()
|
||||||
} as T
|
} as T
|
||||||
|
|||||||
Reference in New Issue
Block a user