aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Uniques.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-24 13:21:24 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-24 18:56:48 +0100
commitcdeafeafd252b20a0df5440e0420211af95e0cdc (patch)
treea2112ebe760b54d923f20305f2c29429d7f7cf6b /src/dotty/tools/dotc/core/Uniques.scala
parent91e74ee45c8cedac279ec66f8277c94d05f2f2e3 (diff)
downloaddotty-cdeafeafd252b20a0df5440e0420211af95e0cdc.tar.gz
dotty-cdeafeafd252b20a0df5440e0420211af95e0cdc.tar.bz2
dotty-cdeafeafd252b20a0df5440e0420211af95e0cdc.zip
Resetting uniques and hashset reorg.
Uniques are now cleared after each run. Also, HashSets get a more standard API, without a label, but with configurable load factor.
Diffstat (limited to 'src/dotty/tools/dotc/core/Uniques.scala')
-rw-r--r--src/dotty/tools/dotc/core/Uniques.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Uniques.scala b/src/dotty/tools/dotc/core/Uniques.scala
index 9ad736c9c..5e5b3e225 100644
--- a/src/dotty/tools/dotc/core/Uniques.scala
+++ b/src/dotty/tools/dotc/core/Uniques.scala
@@ -39,7 +39,7 @@ object Uniques {
)
*/
- final class NamedTypeUniques extends HashSet[NamedType]("uniqueNamedTypes", initialUniquesCapacity) with Hashable {
+ final class NamedTypeUniques extends HashSet[NamedType](initialUniquesCapacity) with Hashable {
override def hash(x: NamedType): Int = x.hash
private def findPrevious(h: Int, prefix: Type, name: Name): NamedType = {
@@ -65,7 +65,7 @@ object Uniques {
}
}
- final class TypeBoundsUniques extends HashSet[TypeBounds]("uniqueTypeBounds", initialUniquesCapacity) with Hashable {
+ final class TypeBoundsUniques extends HashSet[TypeBounds](initialUniquesCapacity) with Hashable {
override def hash(x: TypeBounds): Int = x.hash
private def findPrevious(h: Int, lo: Type, hi: Type, variance: Int): TypeBounds = {
@@ -92,7 +92,7 @@ object Uniques {
}
}
- final class RefinedUniques extends HashSet[RefinedType]("uniqueRefinedTypes", initialUniquesCapacity) with Hashable {
+ final class RefinedUniques extends HashSet[RefinedType](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