mirror of https://github.com/sbt/sbt.git
remove unneeded unlinking in compiler interface
This commit is contained in:
parent
2db0101eb8
commit
1581d1b7e1
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue