diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-31 18:32:02 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:12 +0200 |
commit | b4f21c6da6b6bc1797908f1400631573b6445e31 (patch) | |
tree | 19efe5c588230059b04ef046114c30d3fd64b1f9 /compiler/src/dotty/tools/dotc/core/NameKinds.scala | |
parent | 7a927ce233a8ea4b8ddc285b8a36c61ca3fdd405 (diff) | |
download | dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.gz dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.tar.bz2 dotty-b4f21c6da6b6bc1797908f1400631573b6445e31.zip |
Names are no longer Seqs
Drop Seq implementation of name. This implementation
was always problematic because it entailed potentially
very costly conversions to toSimpleName. We now have
better control over when we convert a name to a simple
name.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/NameKinds.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameKinds.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index cabb83171..8ea19bed2 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -164,7 +164,7 @@ object NameKinds { val ExpandPrefixName = new QualifiedNameKind(EXPANDPREFIX, "$") val ExpandedName = new QualifiedNameKind(EXPANDED, str.EXPAND_SEPARATOR) { - private val FalseSuper = "$$super".toTermName + private val FalseSuper = termName("$$super") private val FalseSuperLength = FalseSuper.length override def unmangle(name: SimpleTermName): TermName = { @@ -216,10 +216,10 @@ object NameKinds { object DefaultGetterName extends NumberedNameKind(DEFAULTGETTER, "DefaultGetter") { def mkString(underlying: TermName, info: ThisInfo) = { val prefix = if (underlying.isConstructorName) nme.DEFAULT_GETTER_INIT else underlying - prefix.toString + nme.DEFAULT_GETTER + (info.num + 1) + prefix.toString + str.DEFAULT_GETTER + (info.num + 1) } - private val dgLen = nme.DEFAULT_GETTER.length + private val dgLen = str.DEFAULT_GETTER.length override def unmangle(name: SimpleTermName): TermName = { var i = name.length |