diff options
author | Martin Odersky <odersky@gmail.com> | 2016-11-19 13:42:36 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-11-19 13:42:36 +0100 |
commit | ca8def4b01369ffbb367b9bb6531dfc1ae4e7936 (patch) | |
tree | 37d669377c9c0c00eaa4d3198961909f20a6ed0b /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | ddec688b6e165c68cdd9a33dac968ee4a09b447a (diff) | |
download | dotty-ca8def4b01369ffbb367b9bb6531dfc1ae4e7936.tar.gz dotty-ca8def4b01369ffbb367b9bb6531dfc1ae4e7936.tar.bz2 dotty-ca8def4b01369ffbb367b9bb6531dfc1ae4e7936.zip |
Plug another space leak.
`initInfo` was retained in Symbols. When called from `Namer`, `initInfo` referred to
a completer, which referred to a context.
With this space leak plugged, we can now compile 1000 times core/Comments.scala (460lines)
with -Xmx400M.
There still seems to be a space leak on the order of 200KB per run, though. But that seems
to have to do with symbols, not contexts.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index fb6a40100..8b7c28e19 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -105,7 +105,7 @@ object SymDenotations { ownerIfExists: Symbol, final val name: Name, initFlags: FlagSet, - final val initInfo: Type, + initInfo: Type, initPrivateWithin: Symbol = NoSymbol) extends SingleDenotation(symbol) { //assert(symbol.id != 4940, name) @@ -232,7 +232,7 @@ object SymDenotations { case _ => } */ - if (Config.checkNoSkolemsInInfo) assertNoSkolems(initInfo) + if (Config.checkNoSkolemsInInfo) assertNoSkolems(tp) myInfo = tp } @@ -751,7 +751,7 @@ object SymDenotations { // def isOverridable: Boolean = !!! need to enforce that classes cannot be redefined def isSkolem: Boolean = name == nme.SKOLEM - def isInlineMethod(implicit ctx: Context): Boolean = is(InlineMethod, butNot = Accessor) + def isInlineMethod(implicit ctx: Context): Boolean = is(InlineMethod, butNot = Accessor) // ------ access to related symbols --------------------------------- |