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/Contexts.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/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 5d2750aa8..88923d31d 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -20,6 +20,7 @@ import util.{FreshNameCreator, SimpleMap, SourceFile, NoSource} import typer._ import Implicits.ContextualImplicits import config.Settings._ +import config.Config import reporting._ import collection.mutable import collection.immutable.BitSet @@ -508,7 +509,7 @@ object Contexts { def nextId = { _nextId += 1; _nextId } /** A map from a superclass id to the typeref of the class that has it */ - private[core] var classOfId = new Array[ClassSymbol](InitialSuperIdsSize) + private[core] var classOfId = new Array[ClassSymbol](Config.InitialSuperIdsSize) /** A map from a the typeref of a class to its superclass id */ private[core] val superIdOfClass = new mutable.AnyRefMap[ClassSymbol, Int] @@ -529,7 +530,7 @@ object Contexts { // Types state /** A table for hash consing unique types */ - private[core] val uniques = new util.HashSet[Type](initialUniquesCapacity) { + private[core] val uniques = new util.HashSet[Type](Config.initialUniquesCapacity) { override def hash(x: Type): Int = x.hash } @@ -614,20 +615,4 @@ object Contexts { myBounds = myBounds.updated(sym, b) def bounds = myBounds } - - /** Initial size of superId table */ - private final val InitialSuperIdsSize = 4096 - - /** Initial capacity of uniques HashMap */ - private[core] final val initialUniquesCapacity = 40000 - - /** How many recursive calls to NamedType#underlying are performed before - * logging starts. - */ - private[core] final val LogPendingUnderlyingThreshold = 50 - - /** How many recursive calls to isSubType are performed before - * logging starts. - */ - private[core] final val LogPendingSubTypesThreshold = 50 } |