remove unneeded unlinking in compiler interface

This commit is contained in:
Mark Harrah 2012-05-30 07:41:02 -04:00
parent 2db0101eb8
commit 1581d1b7e1
2 changed files with 0 additions and 17 deletions

View File

@ -44,7 +44,6 @@ final class Analyzer(val global: CallbackGlobal) extends Compat
classFile(on) match
{
case Some((f,className,inOutDir)) =>
if(inOutDir && on.isJavaDefined) registerTopLevelSym(on)
f match
{
case ze: ZipArchive#Entry => for(zip <- ze.underlyingSource; zipFile <- Option(zip.file) ) binaryDependency(zipFile, className)

View File

@ -172,7 +172,6 @@ private final class CachedCompiler0(args: Array[String], initialLog: WeakLog) ex
def clear()
{
callback0 = null
atPhase(currentRun.namerPhase) { forgetAll() }
superDropRun()
reporter = null
}
@ -189,21 +188,6 @@ private final class CachedCompiler0(args: Array[String], initialLog: WeakLog) ex
def findOnClassPath(name: String): Option[AbstractFile] =
classPath.findClass(name).flatMap(_.binary.asInstanceOf[Option[AbstractFile]])
override def registerTopLevelSym(sym: Symbol) = toForget += sym
final def unlinkAll(m: Symbol) {
val scope = m.owner.info.decls
scope unlink m
scope unlink m.companionSymbol
}
def forgetAll()
{
for(sym <- toForget)
unlinkAll(sym)
toForget = mutable.Set()
}
// fine-control over external changes is unimplemented:
// must drop whole CachedCompiler when !changes.isEmpty
def reload(changes: DependencyChanges)