aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-28 22:35:15 +0200
committerMartin Odersky <odersky@gmail.com>2017-04-11 09:33:11 +0200
commit3fe4e061ef90b8dde10b2e9542f17a34c0fbcb5d (patch)
tree2780821f32afabb8fac92cd9a38ad462b69191b5 /compiler/src/dotty/tools/dotc/core
parentca5652cc5a74f00277ce942a001fa6e931ee3728 (diff)
downloaddotty-3fe4e061ef90b8dde10b2e9542f17a34c0fbcb5d.tar.gz
dotty-3fe4e061ef90b8dde10b2e9542f17a34c0fbcb5d.tar.bz2
dotty-3fe4e061ef90b8dde10b2e9542f17a34c0fbcb5d.zip
Rename NameExtractor -> NameKind
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Denotations.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/NameExtractors.scala131
-rw-r--r--compiler/src/dotty/tools/dotc/core/NameOps.scala4
-rw-r--r--compiler/src/dotty/tools/dotc/core/Names.scala28
-rw-r--r--compiler/src/dotty/tools/dotc/core/SymDenotations.scala6
-rw-r--r--compiler/src/dotty/tools/dotc/core/Symbols.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/TypeApplications.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/Types.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala4
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala6
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala2
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala2
13 files changed, 96 insertions, 97 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Denotations.scala b/compiler/src/dotty/tools/dotc/core/Denotations.scala
index 42837122a..fca77fc06 100644
--- a/compiler/src/dotty/tools/dotc/core/Denotations.scala
+++ b/compiler/src/dotty/tools/dotc/core/Denotations.scala
@@ -6,7 +6,7 @@ import SymDenotations.{ SymDenotation, ClassDenotation, NoDenotation }
import Contexts.{Context, ContextBase}
import Names._
import NameOps._
-import NameExtractors._
+import NameKinds._
import StdNames._
import Symbols.NoSymbol
import Symbols._
diff --git a/compiler/src/dotty/tools/dotc/core/NameExtractors.scala b/compiler/src/dotty/tools/dotc/core/NameExtractors.scala
index 1439ce002..7350087a5 100644
--- a/compiler/src/dotty/tools/dotc/core/NameExtractors.scala
+++ b/compiler/src/dotty/tools/dotc/core/NameExtractors.scala
@@ -11,22 +11,22 @@ import Decorators._
import Contexts.Context
import collection.mutable
-object NameExtractors {
+object NameKinds {
- @sharable private val simpleExtractors = new mutable.HashMap[Int, ClassifiedNameExtractor]
- @sharable private val uniqueExtractors = new mutable.HashMap[String, UniqueNameExtractor]
- @sharable private val qualifiedExtractors = new mutable.HashMap[String, QualifiedNameExtractor]
+ @sharable private val simpleNameKinds = new mutable.HashMap[Int, ClassifiedNameKind]
+ @sharable private val uniqueNameKinds = new mutable.HashMap[String, UniqueNameKind]
+ @sharable private val qualifiedNameKinds = new mutable.HashMap[String, QualifiedNameKind]
abstract class NameInfo extends DotClass {
- def extractor: NameExtractor
+ def kind: NameKind
def mkString(underlying: TermName): String
def map(f: SimpleTermName => SimpleTermName): NameInfo = this
}
- abstract class NameExtractor(val tag: Int) extends DotClass { self =>
+ abstract class NameKind(val tag: Int) extends DotClass { self =>
type ThisInfo <: Info
class Info extends NameInfo { this: ThisInfo =>
- def extractor = self
+ def kind = self
def mkString(underlying: TermName) = self.mkString(underlying, this)
override def toString = infoString
}
@@ -35,14 +35,14 @@ object NameExtractors {
def infoString: String
}
- object SimpleTermNameExtractor extends NameExtractor(UTF8) { self =>
+ object SimpleTermNameKind extends NameKind(UTF8) { self =>
type ThisInfo = Info
val info = new Info
def mkString(underlying: TermName, info: ThisInfo) = unsupported("mkString")
def infoString = unsupported("infoString")
}
- abstract class ClassifiedNameExtractor(tag: Int, val infoString: String) extends NameExtractor(tag) {
+ abstract class ClassifiedNameKind(tag: Int, val infoString: String) extends NameKind(tag) {
type ThisInfo = Info
val info = new Info
def apply(qual: TermName) =
@@ -51,17 +51,17 @@ object NameExtractors {
case DerivedTermName(underlying, `info`) => Some(underlying)
case _ => None
}
- simpleExtractors(tag) = this
+ simpleNameKinds(tag) = this
}
- class PrefixNameExtractor(tag: Int, prefix: String, optInfoString: String = "")
- extends ClassifiedNameExtractor(tag, if (optInfoString.isEmpty) s"Prefix $prefix" else optInfoString) {
+ class PrefixNameKind(tag: Int, prefix: String, optInfoString: String = "")
+ extends ClassifiedNameKind(tag, if (optInfoString.isEmpty) s"Prefix $prefix" else optInfoString) {
def mkString(underlying: TermName, info: ThisInfo) =
underlying.mapLast(n => termName(prefix + n.toString)).toString
}
- class SuffixNameExtractor(tag: Int, suffix: String, optInfoString: String = "")
- extends ClassifiedNameExtractor(tag, if (optInfoString.isEmpty) s"Suffix $suffix" else optInfoString) {
+ class SuffixNameKind(tag: Int, suffix: String, optInfoString: String = "")
+ extends ClassifiedNameKind(tag, if (optInfoString.isEmpty) s"Suffix $suffix" else optInfoString) {
def mkString(underlying: TermName, info: ThisInfo) = underlying.toString ++ suffix
}
@@ -69,8 +69,8 @@ object NameExtractors {
val name: SimpleTermName
}
- class QualifiedNameExtractor(tag: Int, val separator: String)
- extends NameExtractor(tag) {
+ class QualifiedNameKind(tag: Int, val separator: String)
+ extends NameKind(tag) {
type ThisInfo = QualInfo
case class QualInfo(val name: SimpleTermName) extends Info with QualifiedInfo {
override def map(f: SimpleTermName => SimpleTermName): NameInfo = new QualInfo(f(name))
@@ -89,7 +89,7 @@ object NameExtractors {
s"$underlying$separator${info.name}"
def infoString = s"Qualified $separator"
- qualifiedExtractors(separator) = this
+ qualifiedNameKinds(separator) = this
}
object AnyQualifiedName {
@@ -100,14 +100,13 @@ object NameExtractors {
}
}
- trait NumberedInfo {
+ trait NumberedInfo extends NameInfo {
def num: Int
- def extractor: NameExtractor
}
- abstract class NumberedNameExtractor(tag: Int, val infoString: String) extends NameExtractor(tag) { self =>
+ abstract class NumberedNameKind(tag: Int, val infoString: String) extends NameKind(tag) { self =>
type ThisInfo = NumberedInfo
- case class NumberedInfo(val num: Int) extends Info with NameExtractors.NumberedInfo {
+ case class NumberedInfo(val num: Int) extends Info with NameKinds.NumberedInfo {
override def toString = s"$infoString $num"
}
def apply(qual: TermName, num: Int) =
@@ -118,8 +117,8 @@ object NameExtractors {
}
}
- case class UniqueNameExtractor(val separator: String)
- extends NumberedNameExtractor(UNIQUE, s"Unique $separator") {
+ case class UniqueNameKind(val separator: String)
+ extends NumberedNameKind(UNIQUE, s"Unique $separator") {
override def definesNewName = true
def mkString(underlying: TermName, info: ThisInfo) = {
val safePrefix = str.sanitize(underlying.toString + separator)
@@ -129,62 +128,62 @@ object NameExtractors {
def fresh(prefix: TermName = EmptyTermName)(implicit ctx: Context): TermName =
ctx.freshNames.newName(prefix, this)
- uniqueExtractors(separator) = this
+ uniqueNameKinds(separator) = this
}
object AnyUniqueName {
def unapply(name: DerivedTermName): Option[(TermName, String, Int)] = name match {
case DerivedTermName(qual, info: NumberedInfo) =>
- info.extractor match {
- case unique: UniqueNameExtractor => Some((qual, unique.separator, info.num))
+ info.kind match {
+ case unique: UniqueNameKind => Some((qual, unique.separator, info.num))
case _ => None
}
case _ => None
}
}
- val QualifiedName = new QualifiedNameExtractor(QUALIFIED, ".")
- val FlattenedName = new QualifiedNameExtractor(FLATTENED, "$")
- val ExpandedName = new QualifiedNameExtractor(EXPANDED, str.EXPAND_SEPARATOR)
- val TraitSetterName = new QualifiedNameExtractor(TRAITSETTER, str.TRAIT_SETTER_SEPARATOR)
+ val QualifiedName = new QualifiedNameKind(QUALIFIED, ".")
+ val FlattenedName = new QualifiedNameKind(FLATTENED, "$")
+ val ExpandedName = new QualifiedNameKind(EXPANDED, str.EXPAND_SEPARATOR)
+ val TraitSetterName = new QualifiedNameKind(TRAITSETTER, str.TRAIT_SETTER_SEPARATOR)
- val UniqueName = new UniqueNameExtractor("$") {
+ val UniqueName = new UniqueNameKind("$") {
override def mkString(underlying: TermName, info: ThisInfo) =
if (underlying.isEmpty) "$" + info.num + "$" else super.mkString(underlying, info)
}
- val InlineAccessorName = new UniqueNameExtractor("$_inlineAccessor_$")
- val TempResultName = new UniqueNameExtractor("ev$")
- val EvidenceParamName = new UniqueNameExtractor("evidence$")
- val DepParamName = new UniqueNameExtractor("<param>")
- val LazyImplicitName = new UniqueNameExtractor("$_lazy_implicit_$")
- val LazyLocalName = new UniqueNameExtractor("$lzy")
- val LazyLocalInitName = new UniqueNameExtractor("$lzyINIT")
- val LazyFieldOffsetName = new UniqueNameExtractor("$OFFSET")
- val LazyBitMapName = new UniqueNameExtractor(nme.BITMAP_PREFIX.toString)
- val NonLocalReturnKeyName = new UniqueNameExtractor("nonLocalReturnKey")
- val WildcardParamName = new UniqueNameExtractor("_$")
- val TailLabelName = new UniqueNameExtractor("tailLabel")
- val ExceptionBinderName = new UniqueNameExtractor("ex")
- val SkolemName = new UniqueNameExtractor("?")
- val LiftedTreeName = new UniqueNameExtractor("liftedTree")
-
- val PatMatStdBinderName = new UniqueNameExtractor("x")
- val PatMatPiName = new UniqueNameExtractor("pi") // FIXME: explain what this is
- val PatMatPName = new UniqueNameExtractor("p") // FIXME: explain what this is
- val PatMatOName = new UniqueNameExtractor("o") // FIXME: explain what this is
- val PatMatCaseName = new UniqueNameExtractor("case")
- val PatMatMatchFailName = new UniqueNameExtractor("matchFail")
- val PatMatSelectorName = new UniqueNameExtractor("selector")
-
- object DefaultGetterName extends NumberedNameExtractor(DEFAULTGETTER, "DefaultGetter") {
+ val InlineAccessorName = new UniqueNameKind("$_inlineAccessor_$")
+ val TempResultName = new UniqueNameKind("ev$")
+ val EvidenceParamName = new UniqueNameKind("evidence$")
+ val DepParamName = new UniqueNameKind("<param>")
+ val LazyImplicitName = new UniqueNameKind("$_lazy_implicit_$")
+ val LazyLocalName = new UniqueNameKind("$lzy")
+ val LazyLocalInitName = new UniqueNameKind("$lzyINIT")
+ val LazyFieldOffsetName = new UniqueNameKind("$OFFSET")
+ val LazyBitMapName = new UniqueNameKind(nme.BITMAP_PREFIX.toString)
+ val NonLocalReturnKeyName = new UniqueNameKind("nonLocalReturnKey")
+ val WildcardParamName = new UniqueNameKind("_$")
+ val TailLabelName = new UniqueNameKind("tailLabel")
+ val ExceptionBinderName = new UniqueNameKind("ex")
+ val SkolemName = new UniqueNameKind("?")
+ val LiftedTreeName = new UniqueNameKind("liftedTree")
+
+ val PatMatStdBinderName = new UniqueNameKind("x")
+ val PatMatPiName = new UniqueNameKind("pi") // FIXME: explain what this is
+ val PatMatPName = new UniqueNameKind("p") // FIXME: explain what this is
+ val PatMatOName = new UniqueNameKind("o") // FIXME: explain what this is
+ val PatMatCaseName = new UniqueNameKind("case")
+ val PatMatMatchFailName = new UniqueNameKind("matchFail")
+ val PatMatSelectorName = new UniqueNameKind("selector")
+
+ 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)
}
}
- object VariantName extends NumberedNameExtractor(VARIANT, "Variant") {
+ object VariantName extends NumberedNameKind(VARIANT, "Variant") {
val varianceToPrefix = Map(-1 -> '-', 0 -> '=', 1 -> '+')
val prefixToVariance = Map('-' -> -1, '=' -> 0, '+' -> 1)
def mkString(underlying: TermName, info: ThisInfo) = {
@@ -192,13 +191,13 @@ object NameExtractors {
}
}
- val SuperAccessorName = new PrefixNameExtractor(SUPERACCESSOR, "super$")
- val InitializerName = new PrefixNameExtractor(INITIALIZER, "initial$")
- val ShadowedName = new PrefixNameExtractor(SHADOWED, "(shadowed)")
- val AvoidClashName = new SuffixNameExtractor(AVOIDCLASH, "$_avoid_name_clash_$")
- val ModuleClassName = new SuffixNameExtractor(OBJECTCLASS, "$", optInfoString = "ModuleClass")
+ val SuperAccessorName = new PrefixNameKind(SUPERACCESSOR, "super$")
+ val InitializerName = new PrefixNameKind(INITIALIZER, "initial$")
+ val ShadowedName = new PrefixNameKind(SHADOWED, "(shadowed)")
+ val AvoidClashName = new SuffixNameKind(AVOIDCLASH, "$_avoid_name_clash_$")
+ val ModuleClassName = new SuffixNameKind(OBJECTCLASS, "$", optInfoString = "ModuleClass")
- object SignedName extends NameExtractor(63) {
+ object SignedName extends NameKind(63) {
/** @param parts resultSig followed by paramsSig */
case class SignedInfo(sig: Signature) extends Info {
@@ -217,7 +216,7 @@ object NameExtractors {
def infoString: String = "Signed"
}
- def simpleExtractorOfTag : collection.Map[Int, ClassifiedNameExtractor] = simpleExtractors
- def qualifiedExtractorOfSeparator: collection.Map[String, QualifiedNameExtractor] = qualifiedExtractors
- def uniqueExtractorOfSeparator : collection.Map[String, UniqueNameExtractor] = uniqueExtractors
+ def simpleNameKindOfTag : collection.Map[Int, ClassifiedNameKind] = simpleNameKinds
+ def qualifiedNameKindOfSeparator: collection.Map[String, QualifiedNameKind] = qualifiedNameKinds
+ def uniqueNameKindOfSeparator : collection.Map[String, UniqueNameKind] = uniqueNameKinds
} \ No newline at end of file
diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala
index 6f2c75313..356b41efb 100644
--- a/compiler/src/dotty/tools/dotc/core/NameOps.scala
+++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala
@@ -4,7 +4,7 @@ package core
import java.security.MessageDigest
import scala.annotation.switch
import scala.io.Codec
-import Names._, StdNames._, Contexts._, Symbols._, Flags._, NameExtractors._
+import Names._, StdNames._, Contexts._, Symbols._, Flags._, NameKinds._
import Decorators.PreNamedString
import util.{Chars, NameTransformer}
import Chars.isOperatorPart
@@ -136,7 +136,7 @@ object NameOps {
def expandedName(prefix: Name, separator: Name = nme.EXPAND_SEPARATOR): N =
likeTyped {
def qualify(name: SimpleTermName) =
- qualifiedExtractorOfSeparator(separator.toString)(prefix.toTermName, name)
+ qualifiedNameKindOfSeparator(separator.toString)(prefix.toTermName, name)
name rewrite {
case name: SimpleTermName =>
qualify(name)
diff --git a/compiler/src/dotty/tools/dotc/core/Names.scala b/compiler/src/dotty/tools/dotc/core/Names.scala
index e4ebe61c2..37df9cd24 100644
--- a/compiler/src/dotty/tools/dotc/core/Names.scala
+++ b/compiler/src/dotty/tools/dotc/core/Names.scala
@@ -19,7 +19,7 @@ import java.util.HashMap
//import annotation.volatile
object Names {
- import NameExtractors._
+ import NameKinds._
/** A common class for things that can be turned into names.
* Instances are both names and strings, the latter via a decorator.
@@ -75,9 +75,9 @@ object Names {
def likeKinded(name: Name): ThisName
def derived(info: NameInfo): ThisName
- def derived(kind: ClassifiedNameExtractor): ThisName = derived(kind.info)
- def exclude(kind: NameExtractor): ThisName
- def is(kind: NameExtractor): Boolean
+ def derived(kind: ClassifiedNameKind): ThisName = derived(kind.info)
+ def exclude(kind: NameKind): ThisName
+ def is(kind: NameKind): Boolean
def debugString: String
def toText(printer: Printer): Text = printer.toText(this)
@@ -130,7 +130,7 @@ object Names {
def likeKinded(name: Name): TermName = name.toTermName
- def info: NameInfo = SimpleTermNameExtractor.info
+ def info: NameInfo = SimpleTermNameKind.info
def underlying: TermName = unsupported("underlying")
@sharable private var derivedNames: AnyRef /* SimpleMap | j.u.HashMap */ =
@@ -174,8 +174,8 @@ object Names {
* name as underlying name.
*/
def derived(info: NameInfo): TermName = {
- val thisKind = this.info.extractor
- val thatKind = info.extractor
+ val thisKind = this.info.kind
+ val thatKind = info.kind
if (thisKind.tag < thatKind.tag || thatKind.definesNewName) add(info)
else if (thisKind.tag > thatKind.tag) rewrap(underlying.derived(info))
else {
@@ -184,15 +184,15 @@ object Names {
}
}
- def exclude(kind: NameExtractor): TermName = {
- val thisKind = this.info.extractor
+ def exclude(kind: NameKind): TermName = {
+ val thisKind = this.info.kind
if (thisKind.tag < kind.tag || thisKind.definesNewName) this
else if (thisKind.tag > kind.tag) rewrap(underlying.exclude(kind))
else underlying
}
- def is(kind: NameExtractor): Boolean = {
- val thisKind = this.info.extractor
+ def is(kind: NameKind): Boolean = {
+ val thisKind = this.info.kind
thisKind == kind ||
!thisKind.definesNewName && thisKind.tag > kind.tag && underlying.is(kind)
}
@@ -295,8 +295,8 @@ object Names {
def likeKinded(name: Name): TypeName = name.toTypeName
def derived(info: NameInfo): TypeName = toTermName.derived(info).toTypeName
- def exclude(kind: NameExtractor): TypeName = toTermName.exclude(kind).toTypeName
- def is(kind: NameExtractor) = toTermName.is(kind)
+ def exclude(kind: NameKind): TypeName = toTermName.exclude(kind).toTypeName
+ def is(kind: NameKind) = toTermName.is(kind)
override def toString = toTermName.toString
override def debugString = toTermName.debugString + "/T"
@@ -512,7 +512,7 @@ object Names {
implicit val NameOrdering: Ordering[Name] = new Ordering[Name] {
private def compareInfos(x: NameInfo, y: NameInfo): Int =
- if (x.extractor.tag != y.extractor.tag) x.extractor.tag - y.extractor.tag
+ if (x.kind.tag != y.kind.tag) x.kind.tag - y.kind.tag
else x match {
case x: QualifiedInfo =>
y match {
diff --git a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala
index 5e5a5df2d..3d0b306c0 100644
--- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -4,7 +4,7 @@ package core
import Periods._, Contexts._, Symbols._, Denotations._, Names._, NameOps._, Annotations._
import Types._, Flags._, Decorators._, DenotTransformers._, StdNames._, Scopes._, Comments._
-import NameOps._, NameExtractors._
+import NameOps._, NameKinds._
import Scopes.Scope
import collection.mutable
import collection.immutable.BitSet
@@ -406,14 +406,14 @@ object SymDenotations {
}
var prefix = encl.fullNameSeparated(separator)
val fn =
- if (qualifiedExtractorOfSeparator.contains(sep)) {
+ if (qualifiedNameKindOfSeparator.contains(sep)) {
if (sep == "$")
// duplicate scalac's behavior: don't write a double '$$' for module class members.
prefix = prefix.exclude(ModuleClassName)
name rewrite {
case n: SimpleTermName =>
val n1 = if (filler.isEmpty) n else termName(filler ++ n)
- qualifiedExtractorOfSeparator(sep)(prefix.toTermName, n1)
+ qualifiedNameKindOfSeparator(sep)(prefix.toTermName, n1)
}
}
else {
diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala
index 69d6e8db3..e0d9aca2b 100644
--- a/compiler/src/dotty/tools/dotc/core/Symbols.scala
+++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala
@@ -19,7 +19,7 @@ import util.Positions._
import DenotTransformers._
import StdNames._
import NameOps._
-import NameExtractors.LazyImplicitName
+import NameKinds.LazyImplicitName
import ast.tpd.Tree
import ast.TreeTypeMap
import Constants.Constant
diff --git a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala
index 0220928a2..82051b66c 100644
--- a/compiler/src/dotty/tools/dotc/core/TypeApplications.scala
+++ b/compiler/src/dotty/tools/dotc/core/TypeApplications.scala
@@ -11,7 +11,7 @@ import util.Stats._
import util.common._
import Names._
import NameOps._
-import NameExtractors._
+import NameKinds._
import Flags._
import StdNames.tpnme
import util.Positions.Position
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala
index 3f5a30922..c8c1886cc 100644
--- a/compiler/src/dotty/tools/dotc/core/Types.scala
+++ b/compiler/src/dotty/tools/dotc/core/Types.scala
@@ -7,7 +7,7 @@ import Symbols._
import Flags._
import Names._
import StdNames._, NameOps._
-import NameExtractors.{ShadowedName, SkolemName}
+import NameKinds.{ShadowedName, SkolemName}
import Scopes._
import Constants._
import Contexts._
diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index c5194fb93..13315eb3e 100644
--- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -5,7 +5,7 @@ package classfile
import Contexts._, Symbols._, Types._, Names._, StdNames._, NameOps._, Scopes._, Decorators._
import SymDenotations._, unpickleScala2.Scala2Unpickler._, Constants._, Annotations._, util.Positions._
-import NameExtractors.ModuleClassName
+import NameKinds.ModuleClassName
import ast.tpd._
import java.io.{ File, IOException }
import java.lang.Integer.toHexString
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
index 2fd078bef..6df96a9a0 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/NameBuffer.scala
@@ -6,7 +6,7 @@ package tasty
import collection.mutable
import Names.{Name, chrs, SimpleTermName, DerivedTermName}
import NameOps.NameDecorator
-import NameExtractors._
+import NameKinds._
import Decorators._
import TastyBuffer._
import scala.io.Codec
@@ -53,7 +53,7 @@ class NameBuffer extends TastyBuffer(10000) {
def writeNameRef(name: Name): Unit = writeNameRef(nameRefs(name.toTermName))
def pickleNameContents(name: Name): Unit = {
- val tag = name.toTermName.info.extractor.tag
+ val tag = name.toTermName.info.kind.tag
writeByte(tag)
name.toTermName match {
case name: SimpleTermName =>
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala
index 756b7db5c..a14691ed5 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala
@@ -6,7 +6,7 @@ import scala.collection.mutable
import TastyFormat._
import TastyBuffer.NameRef
import Names.{Name, TermName, termName, EmptyTermName}
-import NameExtractors._
+import NameKinds._
import java.util.UUID
object TastyUnpickler {
@@ -60,7 +60,7 @@ class TastyUnpickler(reader: TastyReader) {
val num = readNat()
val originals = until(end)(readName())
val original = if (originals.isEmpty) EmptyTermName else originals.head
- uniqueExtractorOfSeparator(separator)(original, num)
+ uniqueNameKindOfSeparator(separator)(original, num)
case DEFAULTGETTER =>
DefaultGetterName(readName(), readNat())
case VARIANT =>
@@ -73,7 +73,7 @@ class TastyUnpickler(reader: TastyReader) {
if (sig == Signature.NotAMethod) sig = Signature.NotAMethod
SignedName(original, sig)
case _ =>
- simpleExtractorOfTag(tag)(readName())
+ simpleNameKindOfTag(tag)(readName())
}
assert(currentAddr == end, s"bad name $result $start $currentAddr $end")
result
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala
index 355eef1ca..5d33738c2 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala
@@ -9,7 +9,7 @@ import TastyFormat._
import Contexts._, Symbols._, Types._, Names._, Constants._, Decorators._, Annotations._, StdNames.tpnme, NameOps._
import collection.mutable
import typer.Inliner
-import NameOps._, NameExtractors._
+import NameOps._, NameKinds._
import StdNames.nme
import TastyBuffer._
import TypeApplications._
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
index b8e6bbdf0..96bf29a70 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
@@ -5,7 +5,7 @@ package tasty
import Contexts._, Symbols._, Types._, Scopes._, SymDenotations._, Names._, NameOps._
import StdNames._, Denotations._, Flags._, Constants._, Annotations._
-import NameExtractors._
+import NameKinds._
import util.Positions._
import ast.{tpd, Trees, untpd}
import Trees._