diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-28 22:25:09 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:11 +0200 |
commit | ca5652cc5a74f00277ce942a001fa6e931ee3728 (patch) | |
tree | 9ef6e2b341bc10678bbe1f06d4c15fb28093da07 /compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala | |
parent | 1e49ddad97c4e8207913857511ae62467f8cd3ce (diff) | |
download | dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.gz dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.tar.bz2 dotty-ca5652cc5a74f00277ce942a001fa6e931ee3728.zip |
Make freshName semantic
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala index 7ebf3a2ea..756b7db5c 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala @@ -5,7 +5,7 @@ package tasty import scala.collection.mutable import TastyFormat._ import TastyBuffer.NameRef -import Names.{Name, TermName, termName} +import Names.{Name, TermName, termName, EmptyTermName} import NameExtractors._ import java.util.UUID @@ -55,6 +55,12 @@ class TastyUnpickler(reader: TastyReader) { FlattenedName(readName(), readName().asSimpleName) case EXPANDED => ExpandedName(readName(), readName().asSimpleName) + case UNIQUE => + val separator = readName().toString + val num = readNat() + val originals = until(end)(readName()) + val original = if (originals.isEmpty) EmptyTermName else originals.head + uniqueExtractorOfSeparator(separator)(original, num) case DEFAULTGETTER => DefaultGetterName(readName(), readNat()) case VARIANT => @@ -67,7 +73,7 @@ class TastyUnpickler(reader: TastyReader) { if (sig == Signature.NotAMethod) sig = Signature.NotAMethod SignedName(original, sig) case _ => - extractorOfTag(tag)(readName()) + simpleExtractorOfTag(tag)(readName()) } assert(currentAddr == end, s"bad name $result $start $currentAddr $end") result |