From ab2d095943dc63414da8352ebf1e82bdb642450d Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 30 Mar 2017 14:06:43 +0200 Subject: Make "direct names" semantic --- compiler/src/dotty/tools/dotc/core/NameKinds.scala | 1 + compiler/src/dotty/tools/dotc/core/StdNames.scala | 2 -- compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/core') diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index 381bb3fc0..f5a758256 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -248,6 +248,7 @@ object NameKinds { val ProtectedAccessorName = new PrefixNameKind(PROTECTEDACCESSOR, "protected$") val ProtectedSetterName = new PrefixNameKind(PROTECTEDSETTER, "protected$set") // dubious encoding, kept for Scala2 compatibility val AvoidClashName = new SuffixNameKind(AVOIDCLASH, "$_avoid_name_clash_$") + val DirectName = new SuffixNameKind(DIRECT, "$direct") val ModuleClassName = new SuffixNameKind(OBJECTCLASS, "$", optInfoString = "ModuleClass") object SignedName extends NameKind(63) { diff --git a/compiler/src/dotty/tools/dotc/core/StdNames.scala b/compiler/src/dotty/tools/dotc/core/StdNames.scala index 51821c51b..ece3d42dd 100644 --- a/compiler/src/dotty/tools/dotc/core/StdNames.scala +++ b/compiler/src/dotty/tools/dotc/core/StdNames.scala @@ -132,7 +132,6 @@ object StdNames { val COMPANION_MODULE_METHOD: N = "companion$module" val COMPANION_CLASS_METHOD: N = "companion$class" val TRAIT_SETTER_SEPARATOR: N = str.TRAIT_SETTER_SEPARATOR - val DIRECT_SUFFIX: N = "$direct" // value types (and AnyRef) are all used as terms as well // as (at least) arguments to the @specialize annotation. @@ -166,7 +165,6 @@ object StdNames { // fictions we use as both types and terms final val ERROR: N = "" - final val ERRORenc: N = encode("") final val NO_NAME: N = "" // formerly NOSYMBOL final val WILDCARD: N = "_" diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala index ec59e711a..4acadc943 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala @@ -235,9 +235,11 @@ object TastyFormat { final val INITIALIZER = 23 final val SHADOWED = 24 final val AVOIDCLASH = 27 + final val DIRECT = 28 final val OBJECTCLASS = 29 final val SIGNED = 63 + final val firstInternalTag = 64 // AST tags -- cgit v1.2.3