summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-11-29 22:12:51 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-11-29 22:12:55 +1000
commit31723573b3a25cd27f2b5c1079dfb04c5b10910a (patch)
tree84bcb82d79ca4dc45c478d43a437285964ed5cab
parent51d851ce2e403201d99d236a4bafd5728edc754f (diff)
downloadscala-31723573b3a25cd27f2b5c1079dfb04c5b10910a.tar.gz
scala-31723573b3a25cd27f2b5c1079dfb04c5b10910a.tar.bz2
scala-31723573b3a25cd27f2b5c1079dfb04c5b10910a.zip
SD-275 Remove obsolete code from the unpickler
AFAICT, this was only needed to support pickle compatibility after the fix for SI-1591. We don't need to maintain the compatibility after incrementing our major version.
-rw-r--r--src/reflect/scala/reflect/internal/pickling/UnPickler.scala39
1 files changed, 12 insertions, 27 deletions
diff --git a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala
index fd7d2d9dd6..fe1de91662 100644
--- a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala
+++ b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala
@@ -216,18 +216,6 @@ abstract class UnPickler {
}
adjust(decl)
}
- def nestedObjectSymbol: Symbol = {
- // If the owner is overloaded (i.e. a method), it's not possible to select the
- // right member, so return NoSymbol. This can only happen when unpickling a tree.
- // the "case Apply" in readTree() takes care of selecting the correct alternative
- // after parsing the arguments.
- if (owner.isOverloaded)
- return NoSymbol
-
- if (tag == EXTMODCLASSref && !owner.isInstanceOf[StubSymbol])
- owner.info.decl(nme.moduleVarName(name.toTermName))
- else NoSymbol
- }
def moduleAdvice(missing: String): String = {
val module =
@@ -254,21 +242,18 @@ abstract class UnPickler {
// symbols are read from outside: for instance when checking the children
// of a class. See #1722.
fromName(nme.expandedName(name.toTermName, owner)) orElse {
- // (3) Try as a nested object symbol.
- nestedObjectSymbol orElse {
- // (4) Call the mirror's "missing" hook.
- adjust(mirrorThatLoaded(owner).missingHook(owner, name)) orElse {
- // (5) Create a stub symbol to defer hard failure a little longer.
- val advice = moduleAdvice(s"${owner.fullName}.$name")
- val missingMessage =
- s"""|missing or invalid dependency detected while loading class file '$filename'.
- |Could not access ${name.longString} in ${owner.kindString} ${owner.fullName},
- |because it (or its dependencies) are missing. Check your build definition for
- |missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
- |A full rebuild may help if '$filename' was compiled against an incompatible version of ${owner.fullName}.$advice""".stripMargin
- val stubName = if (tag == EXTref) name else name.toTypeName
- owner.newStubSymbol(stubName, missingMessage)
- }
+ // (3) Call the mirror's "missing" hook.
+ adjust(mirrorThatLoaded(owner).missingHook(owner, name)) orElse {
+ // (4) Create a stub symbol to defer hard failure a little longer.
+ val advice = moduleAdvice(s"${owner.fullName}.$name")
+ val missingMessage =
+ s"""|missing or invalid dependency detected while loading class file '$filename'.
+ |Could not access ${name.longString} in ${owner.kindString} ${owner.fullName},
+ |because it (or its dependencies) are missing. Check your build definition for
+ |missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
+ |A full rebuild may help if '$filename' was compiled against an incompatible version of ${owner.fullName}.$advice""".stripMargin
+ val stubName = if (tag == EXTref) name else name.toTypeName
+ owner.newStubSymbol(stubName, missingMessage)
}
}
}