diff options
author | Martin Odersky <odersky@gmail.com> | 2015-05-18 19:30:01 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-21 17:41:15 +0200 |
commit | 24a95aa44a02d438d4df179a6475edfc690f9d9a (patch) | |
tree | 574090b659fbded970429c57828e9bd545686c31 /src/dotty/tools/dotc/core/Uniques.scala | |
parent | 110a438c000cd77caff28ebe9725d2a00f8060d6 (diff) | |
download | dotty-24a95aa44a02d438d4df179a6475edfc690f9d9a.tar.gz dotty-24a95aa44a02d438d4df179a6475edfc690f9d9a.tar.bz2 dotty-24a95aa44a02d438d4df179a6475edfc690f9d9a.zip |
Move threshold values to Config
It's a more logical home for them than the Context object.
Diffstat (limited to 'src/dotty/tools/dotc/core/Uniques.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Uniques.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Uniques.scala b/src/dotty/tools/dotc/core/Uniques.scala index c24b0cabc..b00508d60 100644 --- a/src/dotty/tools/dotc/core/Uniques.scala +++ b/src/dotty/tools/dotc/core/Uniques.scala @@ -2,6 +2,7 @@ package dotty.tools.dotc package core import Types._, Contexts._, util.Stats._, Hashable._, Names._ +import config.Config import util.HashSet /** Defines operation `unique` for hash-consing types. @@ -39,7 +40,7 @@ object Uniques { ) */ - final class NamedTypeUniques extends HashSet[NamedType](initialUniquesCapacity) with Hashable { + final class NamedTypeUniques extends HashSet[NamedType](Config.initialUniquesCapacity) with Hashable { override def hash(x: NamedType): Int = x.hash private def findPrevious(h: Int, prefix: Type, name: Name): NamedType = { @@ -65,7 +66,7 @@ object Uniques { } } - final class TypeAliasUniques extends HashSet[TypeAlias](initialUniquesCapacity) with Hashable { + final class TypeAliasUniques extends HashSet[TypeAlias](Config.initialUniquesCapacity) with Hashable { override def hash(x: TypeAlias): Int = x.hash private def findPrevious(h: Int, alias: Type, variance: Int): TypeAlias = { @@ -90,7 +91,7 @@ object Uniques { } } - final class RefinedUniques extends HashSet[RefinedType](initialUniquesCapacity) with Hashable { + final class RefinedUniques extends HashSet[RefinedType](Config.initialUniquesCapacity) with Hashable { override val hashSeed = classOf[CachedRefinedType].hashCode // some types start life as CachedRefinedTypes, need to have same hash seed override def hash(x: RefinedType): Int = x.hash |