diff options
author | Martin Odersky <odersky@gmail.com> | 2013-01-29 09:44:37 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-01-29 09:44:37 +0100 |
commit | bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98 (patch) | |
tree | 36537cd033d5e37a489839f2970245df9db5e544 /src/dotty/tools/dotc/core/Symbols.scala | |
parent | 9770566c50baff03a7e61344c203b29db8750e8f (diff) | |
download | dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.gz dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.tar.bz2 dotty-bbc4f7a3234937e5f79e8310e6fff2f9b4af0f98.zip |
New Context architecture based on cloning
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 74c29802d..127e36f4d 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -285,16 +285,15 @@ object Symbols { def superId(implicit ctx: Context): Int = { val hint = superIdHint - val rctx = ctx.root - if (hint >= 0 && hint <= rctx.lastSuperId && (rctx.classOfId(hint) eq this)) hint + if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq this)) hint else { - val id = rctx.superIdOfClass get this match { + val id = ctx.superIdOfClass get this match { case Some(id) => id case None => - val id = rctx.nextSuperId - rctx.superIdOfClass(this) = id - rctx.classOfId(id) = this + val id = ctx.nextSuperId + ctx.superIdOfClass(this) = id + ctx.classOfId(id) = this id } superIdHint = id @@ -312,7 +311,7 @@ object Symbols { override def exists = false } - implicit def defn(implicit ctx: Context): Definitions = ctx.root.definitions + implicit def defn(implicit ctx: Context): Definitions = ctx.definitions implicit def toFlagSet(sym: Symbol)(implicit ctx: Context): FlagSet = sym.flags |