From 24a95aa44a02d438d4df179a6475edfc690f9d9a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 18 May 2015 19:30:01 +0200 Subject: Move threshold values to Config It's a more logical home for them than the Context object. --- src/dotty/tools/dotc/core/Uniques.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Uniques.scala') 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 -- cgit v1.2.3