diff options
author | Martin Odersky <odersky@gmail.com> | 2013-01-17 10:23:51 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-01-17 10:23:51 +0100 |
commit | 4ad6538f7d67a42747d578feaaee633c390c4cbc (patch) | |
tree | c4ca95857fe1d6fb0904f4b986deba2f5ba9def2 | |
parent | b43de54be5c4d91762d8dc6a4ce7b612935639f9 (diff) | |
download | dotty-4ad6538f7d67a42747d578feaaee633c390c4cbc.tar.gz dotty-4ad6538f7d67a42747d578feaaee633c390c4cbc.tar.bz2 dotty-4ad6538f7d67a42747d578feaaee633c390c4cbc.zip |
Renamed "Reference" to "Referenced".
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 16 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Referenceds.scala (renamed from src/dotty/tools/dotc/core/References.scala) | 142 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Scopes.scala | 6 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Transformers.scala | 8 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 56 |
6 files changed, 113 insertions, 117 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 8aae7d644..383a46ccd 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -1,7 +1,7 @@ package dotty.tools.dotc package core -import Periods._, Contexts._, Symbols._, References._, Names._ +import Periods._, Contexts._, Symbols._, Referenceds._, Names._ import Types._, Flags._, Decorators._, Transformers._ import Scopes.Scope import collection.mutable @@ -9,7 +9,7 @@ import collection.immutable.BitSet object Denotations { - abstract class Denotation extends SymRef { + abstract class Denotation extends SymRefd { def symbol: Symbol = ??? @@ -54,7 +54,7 @@ object Denotations { def withType(tp: Type): Denotation = ??? - override protected def copy(s: Symbol, i: Type): SymRef = new UniqueSymRef(s, i, validFor) + override protected def copy(s: Symbol, i: Type): SymRefd = new UniqueSymRefd(s, i, validFor) } object NameFilter { @@ -87,9 +87,9 @@ object Denotations { def typeParams: List[TypeSymbol] = ??? - private var memberCacheVar: LRU8Cache[Name, RefSet] = null + private var memberCacheVar: LRU8Cache[Name, ReferencedSet] = null - private def memberCache: LRU8Cache[Name, RefSet] = { + private def memberCache: LRU8Cache[Name, ReferencedSet] = { if (memberCacheVar == null) memberCacheVar = new LRU8Cache memberCacheVar } @@ -219,8 +219,8 @@ object Denotations { if (fp != null) fp else computeDefinedFingerPrint } - final def memberRefsNamed(name: Name)(implicit ctx: Context): RefSet = { - var refs: RefSet = memberCache lookup name + final def memberRefsNamed(name: Name)(implicit ctx: Context): ReferencedSet = { + var refs: ReferencedSet = memberCache lookup name if (refs == null) { if (containsName(definedFingerPrint, name)) { val ownRefs = decls.refsNamed(name) @@ -239,7 +239,7 @@ object Denotations { } } } else { - refs = NoRef + refs = NoRefd } memberCache enter (name, refs) } diff --git a/src/dotty/tools/dotc/core/References.scala b/src/dotty/tools/dotc/core/Referenceds.scala index d102edc77..61f95e0e0 100644 --- a/src/dotty/tools/dotc/core/References.scala +++ b/src/dotty/tools/dotc/core/Referenceds.scala @@ -12,7 +12,7 @@ import Types._, Periods._, Flags._, Transformers._ /** Classes that implement referenced items and sets of them */ -object References { +object Referenceds { /** The signature of a referenced. * Overloaded referenceds with the same name are distinguished by @@ -41,7 +41,7 @@ object References { * A SymRefd refers to a `symbol` and a type (`info`) that the symbol has * when seen from the reference. * - * References can be combined with `&` and `|`. + * Referenceds can be combined with `&` and `|`. * & is conjunction, | is disjunction. * * `&` will create an overloaded reference from two @@ -61,9 +61,9 @@ object References { * val x: A | B = if (???) new A else new B * val y = x.f * - * Then the referenced of `y` is `SymRef(NoSymbol, A | B)`. + * Then the referenced of `y` is `SymRefd(NoSymbol, A | B)`. */ - abstract class Reference extends DotClass { + abstract class Referenced extends DotClass { /** The referenced symbol, exists only for non-overloaded references */ def symbol: Symbol @@ -74,9 +74,6 @@ object References { /** The interval during which this reference is valid */ def validFor: Period - /** The previous reference */ - def prev: Reference = ??? - /** Is this a reference to a type symbol? */ def isType: Boolean = false @@ -84,36 +81,36 @@ object References { def signature: Signature /** Resolve overloaded reference to pick the one with the given signature */ - def atSignature(sig: Signature): Reference + def atSignature(sig: Signature): Referenced /** The variant of this reference that's current in the given context. */ - def current(implicit ctx: Context): Reference + def current(implicit ctx: Context): Referenced def exists: Boolean = true - def orElse(that: => Reference) = if (this.exists) this else that + def orElse(that: => Referenced) = if (this.exists) this else that /** Form a reference by conjoining with reference `that` */ - def & (that: Reference)(implicit ctx: Context): Reference = + def & (that: Referenced)(implicit ctx: Context): Referenced = if (this eq that) this else if (!this.exists) that else if (!that.exists) this else that match { - case that: SymRef => + case that: SymRefd => val r = mergeRef(this, that) - if (r ne NoRef) r else OverloadedRef(this, that) + if (r ne NoRefd) r else OverloadedRef(this, that) case that @ OverloadedRef(ref1, ref2) => this & ref1 & ref2 } /** Try to merge ref1 and ref2 without adding a new signature. - * If unsuccessful, return NoRef. + * If unsuccessful, return NoRefd. */ - private def mergeRef(ref1: Reference, ref2: SymRef)(implicit ctx: Context): Reference = ref1 match { + private def mergeRef(ref1: Referenced, ref2: SymRefd)(implicit ctx: Context): Referenced = ref1 match { case ref1 @ OverloadedRef(ref11, ref12) => val r1 = mergeRef(ref11, ref2) - if (r1 ne NoRef) r1 else mergeRef(ref12, ref2) - case ref1: SymRef => + if (r1 ne NoRefd) r1 else mergeRef(ref12, ref2) + case ref1: SymRefd => if (ref1 eq ref2) ref1 else if (ref1.signature == ref2.signature) { def isEligible(sym1: Symbol, sym2: Symbol) = @@ -131,14 +128,14 @@ object References { val bounds2 = normalize(info2) if (sym2Eligible && bounds2 <:< bounds1) ref2 else if (sym1Eligible && bounds1 <:< bounds2) ref1 - else new JointSymRef( + else new JointSymRefd( if (sym2Eligible) sym2 else sym1, bounds1 & bounds2, ref1.validFor & ref2.validFor) - } else NoRef + } else NoRefd } - def | (that: Reference)(pre: Type)(implicit ctx: Context): Reference = { + def | (that: Referenced)(pre: Type)(implicit ctx: Context): Referenced = { def lubSym(sym1: Symbol, sym2: Symbol): Symbol = { def qualifies(sym: Symbol) = @@ -158,11 +155,11 @@ object References { that match { case ref2 @ OverloadedRef(ref21, ref22) => ref2.derivedOverloadedRef((this | ref21)(pre), (this | ref22)(pre)) - case ref2: SymRef => + case ref2: SymRefd => this match { - case ref1: SymRef => - if (ref1.signature != ref2.signature) NoRef - else new JointSymRef( + case ref1: SymRefd => + if (ref1.signature != ref2.signature) NoRefd + else new JointSymRefd( lubSym(ref1.symbol, ref2.symbol), ref1.info | ref2.info, ref1.validFor & ref2.validFor) @@ -179,20 +176,20 @@ object References { /** The class of overloaded references * @param variants The overloaded variants indexed by thheir signatures. */ - case class OverloadedRef(ref1: Reference, ref2: Reference) extends Reference { - def derivedOverloadedRef(r1: Reference, r2: Reference) = + case class OverloadedRef(ref1: Referenced, ref2: Referenced) extends Referenced { + def derivedOverloadedRef(r1: Referenced, r2: Referenced) = if ((r1 eq ref1) && (r2 eq ref2)) this else OverloadedRef(r1, r2) def symbol = unsupported("symbol") def info = unsupported("info") def signature = unsupported("signature") - def atSignature(sig: Signature): Reference = + def atSignature(sig: Signature): Referenced = ref1.atSignature(sig) orElse ref2.atSignature(sig) def validFor = ref1.validFor & ref2.validFor - def current(implicit ctx: Context): Reference = + def current(implicit ctx: Context): Referenced = derivedOverloadedRef(ref1.current, ref2.current) } - abstract class SymRef extends Reference with RefSet { + abstract class SymRefd extends Referenced with ReferencedSet { override def isType = symbol.isType override def signature: Signature = { @@ -208,31 +205,31 @@ object References { if (isType) NullSignature else sig(info) } - def derivedSymRef(s: Symbol, i: Type): SymRef = + def derivedSymRefd(s: Symbol, i: Type): SymRefd = if ((s eq symbol) && (i eq info)) this else copy(s, i) - protected def copy(s: Symbol, i: Type): SymRef = this + protected def copy(s: Symbol, i: Type): SymRefd = this - def atSignature(sig: Signature): Reference = - if (sig == signature) this else NoRef + def atSignature(sig: Signature): Referenced = + if (sig == signature) this else NoRefd // ------ Transformations ----------------------------------------- var validFor: Period = Nowhere - /** The next SymRef in this run, with wrap-around from last to first. */ - var nextInRun: SymRef = this + /** The next SymRefd in this run, with wrap-around from last to first. */ + var nextInRun: SymRefd = this - /** The version of this SymRef that was valid in the first phase + /** The version of this SymRefd that was valid in the first phase * of this run. */ - def initial: SymRef = { + def initial: SymRefd = { var current = nextInRun while (current.validFor.code > this.validFor.code) current = current.nextInRun current } - def current(implicit ctx: Context): SymRef = { + def current(implicit ctx: Context): SymRefd = { val currentPeriod = ctx.period val valid = validFor var current = this @@ -272,70 +269,71 @@ object References { def asDenotation = asInstanceOf[Denotation] - // ------ RefSet ops ---------------------------------------------- + // ------ ReferencedSet ops ---------------------------------------------- def toRef(implicit ctx: Context) = this def containsSig(sig: Signature)(implicit ctx: Context) = signature == sig - def filter(p: Symbol => Boolean)(implicit ctx: Context): RefSet = - if (p(symbol)) this else NoRef - def filterDisjoint(refs: RefSet)(implicit ctx: Context): RefSet = - if (refs.containsSig(signature)) NoRef else this - def filterExcluded(flags: FlagSet)(implicit ctx: Context): RefSet = - if (symbol.hasFlag(flags)) NoRef else this - def filterAccessibleFrom(pre: Type)(implicit ctx: Context): RefSet = - if (symbol.isAccessibleFrom(pre)) this else NoRef - def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): RefSet = - derivedSymRef(symbol, info.asSeenFrom(pre, owner)) + def filter(p: Symbol => Boolean)(implicit ctx: Context): ReferencedSet = + if (p(symbol)) this else NoRefd + def filterDisjoint(refs: ReferencedSet)(implicit ctx: Context): ReferencedSet = + if (refs.containsSig(signature)) NoRefd else this + def filterExcluded(flags: FlagSet)(implicit ctx: Context): ReferencedSet = + if (symbol.hasFlag(flags)) NoRefd else this + def filterAccessibleFrom(pre: Type)(implicit ctx: Context): ReferencedSet = + if (symbol.isAccessibleFrom(pre)) this else NoRefd + def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): ReferencedSet = + derivedSymRefd(symbol, info.asSeenFrom(pre, owner)) } - class UniqueSymRef(val symbol: Symbol, + class UniqueSymRefd(val symbol: Symbol, val info: Type, - initValidFor: Period) extends SymRef { + initValidFor: Period) extends SymRefd { validFor = initValidFor - override protected def copy(s: Symbol, i: Type): SymRef = new UniqueSymRef(s, i, validFor) + override protected def copy(s: Symbol, i: Type): SymRefd = new UniqueSymRefd(s, i, validFor) } - class JointSymRef(val symbol: Symbol, + class JointSymRefd(val symbol: Symbol, val info: Type, - initValidFor: Period) extends SymRef { + initValidFor: Period) extends SymRefd { validFor = initValidFor - override protected def copy(s: Symbol, i: Type): SymRef = new JointSymRef(s, i, validFor) + override protected def copy(s: Symbol, i: Type): SymRefd = new JointSymRefd(s, i, validFor) } - class ErrorRef(implicit ctx: Context) extends SymRef { + class ErrorRefd(implicit ctx: Context) extends SymRefd { val symbol = NoSymbol val info = NoType validFor = Period.allInRun(ctx.runId) } - object NoRef extends SymRef { + object NoRefd extends SymRefd { val symbol = NoSymbol val info = NoType validFor = Nowhere override def exists = false } -// --------------- RefSets ------------------------------------------------- +// --------------- ReferencedSets ------------------------------------------------- - trait RefSet { + /** A ReferencedSet represents a set of referenced */ + trait ReferencedSet { def exists: Boolean - def toRef(implicit ctx: Context): Reference + def toRef(implicit ctx: Context): Referenced def containsSig(sig: Signature)(implicit ctx: Context): Boolean - def filter(p: Symbol => Boolean)(implicit ctx: Context): RefSet - def filterDisjoint(refs: RefSet)(implicit ctx: Context): RefSet - def filterExcluded(flags: FlagSet)(implicit ctx: Context): RefSet - def filterAccessibleFrom(pre: Type)(implicit ctx: Context): RefSet - def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): RefSet - def union(that: RefSet) = + def filter(p: Symbol => Boolean)(implicit ctx: Context): ReferencedSet + def filterDisjoint(refs: ReferencedSet)(implicit ctx: Context): ReferencedSet + def filterExcluded(flags: FlagSet)(implicit ctx: Context): ReferencedSet + def filterAccessibleFrom(pre: Type)(implicit ctx: Context): ReferencedSet + def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): ReferencedSet + def union(that: ReferencedSet) = if (!this.exists) that else if (that.exists) this else RefUnion(this, that) } - case class RefUnion(refs1: RefSet, refs2: RefSet) extends RefSet { + case class RefUnion(refs1: ReferencedSet, refs2: ReferencedSet) extends ReferencedSet { assert(refs1.exists && !refs2.exists) - private def derivedUnion(s1: RefSet, s2: RefSet) = + private def derivedUnion(s1: ReferencedSet, s2: ReferencedSet) = if (!s1.exists) s2 else if (!s2.exists) s1 else if ((s1 eq refs2) && (s2 eq refs2)) this @@ -346,13 +344,13 @@ object References { (refs1 containsSig sig) || (refs2 containsSig sig) def filter(p: Symbol => Boolean)(implicit ctx: Context) = derivedUnion(refs1 filter p, refs2 filter p) - def filterDisjoint(refs: RefSet)(implicit ctx: Context): RefSet = + def filterDisjoint(refs: ReferencedSet)(implicit ctx: Context): ReferencedSet = derivedUnion(refs1 filterDisjoint refs, refs2 filterDisjoint refs) - def filterExcluded(flags: FlagSet)(implicit ctx: Context): RefSet = + def filterExcluded(flags: FlagSet)(implicit ctx: Context): ReferencedSet = derivedUnion(refs1 filterExcluded flags, refs2 filterExcluded flags) - def filterAccessibleFrom(pre: Type)(implicit ctx: Context): RefSet = + def filterAccessibleFrom(pre: Type)(implicit ctx: Context): ReferencedSet = derivedUnion(refs1 filterAccessibleFrom pre, refs2 filterAccessibleFrom pre) - def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): RefSet = + def asSeenFrom(pre: Type, owner: Symbol)(implicit ctx: Context): ReferencedSet = derivedUnion(refs1.asSeenFrom(pre, owner), refs2.asSeenFrom(pre, owner)) } } diff --git a/src/dotty/tools/dotc/core/Scopes.scala b/src/dotty/tools/dotc/core/Scopes.scala index 7a827ccf1..f9fa69c1c 100644 --- a/src/dotty/tools/dotc/core/Scopes.scala +++ b/src/dotty/tools/dotc/core/Scopes.scala @@ -11,7 +11,7 @@ import Names._ import Periods._ import Decorators._ import Contexts._ -import References._ +import Referenceds._ object Scopes { @@ -195,8 +195,8 @@ object Scopes { } /** The reference set of all the symbols with given name in this scope */ - def refsNamed(name: Name)(implicit ctx: Context): RefSet = { - var syms: RefSet = NoRef + def refsNamed(name: Name)(implicit ctx: Context): ReferencedSet = { + var syms: ReferencedSet = NoRefd var e = lookupEntry(name) while (e != null) { syms = syms union e.sym.deref diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 3f14fd37b..331c168a8 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -11,7 +11,7 @@ import Symbols._ import Contexts._ import Denotations._ import Types._ -import References.{Reference, SymRef, OverloadedRef} +import Referenceds.{Referenced, SymRefd, OverloadedRef} import collection.mutable object Symbols { diff --git a/src/dotty/tools/dotc/core/Transformers.scala b/src/dotty/tools/dotc/core/Transformers.scala index 2bc475104..ae58080e4 100644 --- a/src/dotty/tools/dotc/core/Transformers.scala +++ b/src/dotty/tools/dotc/core/Transformers.scala @@ -1,14 +1,14 @@ package dotty.tools.dotc package core -import Periods._, Denotations._, Contexts._, Types._, References._ +import Periods._, Denotations._, Contexts._, Types._, Referenceds._ import java.lang.AssertionError trait Transformers { self: RootContext => import Transformers._ - def transformersFor(ref: SymRef): TransformerGroup = ref match { + def transformersFor(ref: SymRefd): TransformerGroup = ref match { case _: Denotation => denotTransformers case _ => refTransformers } @@ -28,12 +28,12 @@ object Transformers { def lastPhaseId = nextTransformer(phaseId).phaseId - 1 def validFor(implicit ctx: Context): Period = Period(ctx.runId, phaseId, lastPhaseId) - def transform(ref: SymRef)(implicit ctx: Context): SymRef + def transform(ref: SymRefd)(implicit ctx: Context): SymRefd } object NoTransformer extends Transformer { val phaseId = lastPhaseId + 1 - def transform(ref: SymRef)(implicit ctx: Context): SymRef = + def transform(ref: SymRefd)(implicit ctx: Context): SymRefd = unsupported("transform") } diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 3c5530bb0..4db037a86 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -11,7 +11,7 @@ import Constants._ import Contexts._ import Annotations._ import Denotations._ -import References._ +import Referenceds._ import Periods._ import scala.util.hashing.{ MurmurHash3 => hashing } import collection.mutable @@ -195,11 +195,11 @@ object Types { if (from.isDependent) ctx.subst(this, from, to, null) else this - /** Substitute all references of the form `This(clazz)` by `tp` */ + /** Substitute all occurrences of `This(clazz)` by `tp` */ final def substThis(clazz: ClassSymbol, tp: Type)(implicit ctx: Context): Type = ctx.substThis(this, clazz, tp, null) - /** Substitute all references of the form `RefinedThis(from)` by `tp` */ + /** Substitute all occurrences of `RefinedThis(from)` by `tp` */ final def substThis(from: RefinedType, tp: Type)(implicit ctx: Context): Type = ctx.substThis(this, from, tp, null) @@ -255,23 +255,23 @@ object Types { } /** The declaration of this type with given name */ - final def decl(name: Name)(implicit ctx: Context): Reference = + final def decl(name: Name)(implicit ctx: Context): Referenced = decls.refsNamed(name).toRef /** The member of this type with given name */ - final def member(name: Name)(implicit ctx: Context): Reference = + final def member(name: Name)(implicit ctx: Context): Referenced = findMember(name, this, Flags.Empty) /** The non-private member of this type with given name */ - final def nonPrivateMember(name: Name)(implicit ctx: Context): Reference = + final def nonPrivateMember(name: Name)(implicit ctx: Context): Referenced = findMember(name, this, Flags.Private) /** Find member of this type with given name and - * produce a reference that contains the type of the member + * produce a referenced that contains the type of the member * as seen from given prefix `pre`. Exclude all members with one * of the flags in `excluded` from consideration. */ - final def findMember(name: Name, pre: Type, excluded: FlagSet)(implicit ctx: Context): Reference = this match { + final def findMember(name: Name, pre: Type, excluded: FlagSet)(implicit ctx: Context): Referenced = this match { case tp: RefinedType => tp.parent.findMember(name, pre, excluded | Flags.Private) & tp.findDecl(name, pre) @@ -285,7 +285,7 @@ object Types { .filterExcluded(excluded) .asSeenFrom(pre, classd.clazz) if (resultSyms.exists) resultSyms.toRef - else new ErrorRef // todo: refine + else new ErrorRefd // todo: refine case tp: AndType => tp.tp1.findMember(name, pre, excluded) & tp.tp2.findMember(name, pre, excluded) case tp: OrType => @@ -515,37 +515,35 @@ object Types { val prefix: Type val name: Name - private[this] var referenceVar: Reference = null + private[this] var lastReferenced: Referenced = null private def checkPrefix(sym: Symbol) = sym.isAbstractType || sym.isClass - /** The reference currently denoted by this type */ - def reference(implicit ctx: Context): Reference = { + /** The referenced currently denoted by this type */ + def deref(implicit ctx: Context): Referenced = { val validPeriods = - if (referenceVar != null) referenceVar.validFor else Nowhere + if (lastReferenced != null) lastReferenced.validFor else Nowhere if (!(validPeriods contains ctx.period)) { val thisPeriod = ctx.period - referenceVar = + lastReferenced = if (validPeriods.runId == thisPeriod.runId) - referenceVar.current - //val ref @ SymRef(clazz: ClassSymbol, _) = referenceVar - //ref.derivedSymRef(clazz, ClassInfo(prefix, clazz.deref)) + lastReferenced.current else if (thisPeriod.phaseId > name.lastIntroPhaseId) ctx.atPhase(name.lastIntroPhaseId)(prefix.member(name)(_)).current else prefix.member(name) - if (checkPrefix(referenceVar.symbol) && !prefix.isLegalPrefix) - throw new MalformedType(prefix, referenceVar.symbol) + if (checkPrefix(lastReferenced.symbol) && !prefix.isLegalPrefix) + throw new MalformedType(prefix, lastReferenced.symbol) } - referenceVar + lastReferenced } def isType = name.isTypeName def isTerm = name.isTermName - def symbol(implicit ctx: Context): Symbol = reference.symbol - def info(implicit ctx: Context): Type = reference.info + def symbol(implicit ctx: Context): Symbol = deref.symbol + def info(implicit ctx: Context): Type = deref.info override def underlying(implicit ctx: Context): Type = info @@ -566,7 +564,7 @@ object Types { protected val fixedSym: Symbol override def symbol(implicit ctx: Context): Symbol = fixedSym override def info(implicit ctx: Context): Type = fixedSym.info - override def reference(implicit ctx: Context): Reference = fixedSym.deref + override def deref(implicit ctx: Context): Referenced = fixedSym.deref } final class TermRefNoPrefix(val fixedSym: TermSymbol)(implicit ctx: Context) @@ -575,8 +573,8 @@ object Types { final class TermRefWithSignature(prefix: Type, name: TermName, override val signature: Signature) extends TermRef(prefix, name) { override def computeHash = doHash((name, signature), prefix) - override def reference(implicit ctx: Context): Reference = - super.reference.atSignature(signature) + override def deref(implicit ctx: Context): Referenced = + super.deref.atSignature(signature) } final class TypeRefNoPrefix(val fixedSym: TypeSymbol)(implicit ctx: Context) @@ -687,13 +685,13 @@ object Types { infos1 map (_.substThis(this, thistp)) } - def findDecl(name: Name, pre: Type)(implicit ctx: Context): Reference = { + def findDecl(name: Name, pre: Type)(implicit ctx: Context): Referenced = { var ns = names var is = infos - var ref: Reference = NoRef - while (ns.nonEmpty && (ref eq NoRef)) { + var ref: Referenced = NoRefd + while (ns.nonEmpty && (ref eq NoRefd)) { if (ns.head == name) - ref = new JointSymRef(NoSymbol, is.head.substThis(this, pre), Period.allInRun(ctx.runId)) + ref = new JointSymRefd(NoSymbol, is.head.substThis(this, pre), Period.allInRun(ctx.runId)) ns = ns.tail is = is.tail } |