summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-05-29 12:59:35 +0200
committerMartin Odersky <odersky@gmail.com>2012-05-30 17:32:56 +0200
commite156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a (patch)
tree7622916722f81294d22699a580e57a0c7202b3fb /src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
parent765aab65614fd18b67b961f4b91047b536a554c3 (diff)
downloadscala-e156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a.tar.gz
scala-e156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a.tar.bz2
scala-e156d4a7cf4afdab91b7c281a0e8ae6e4743cc4a.zip
Partial redesign of incremental compiler invalidation.
We now do the right thing when packages are either newly created or deleted. Previously there was a problem when a new package was created inside a system package (and, unofrtunately, root is a system package). That's fixed now. We also approximate more tightly now when packages are newly created (iei the newly created symbol gets rescanned, instead of its owner). Incremental class invalidation: dealing with empty package. The compiler can now also invalidate the empty package. Previously, no invalidation was done because empty was identified with root, which is considered a system package. (1) Fixed NPE when creating a new toplevel package in invalidation. (2) generalized interface to deal with multiple entries at a time.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/JavaPlatform.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/JavaPlatform.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala b/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
index e5e67e8811..62885cc73d 100644
--- a/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
+++ b/src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
@@ -23,10 +23,10 @@ trait JavaPlatform extends Platform {
if (currentClassPath.isEmpty) currentClassPath = Some(new PathResolver(settings).result)
currentClassPath.get
}
-
+
/** Update classpath with a substituted subentry */
- def updateClassPath(oldEntry: ClassPath[BinaryRepr], newEntry: ClassPath[BinaryRepr]) =
- currentClassPath = Some(new DeltaClassPath(currentClassPath.get, oldEntry, newEntry))
+ def updateClassPath(subst: Map[ClassPath[BinaryRepr], ClassPath[BinaryRepr]]) =
+ currentClassPath = Some(new DeltaClassPath(currentClassPath.get, subst))
def rootLoader = new loaders.PackageLoader(classPath.asInstanceOf[ClassPath[platform.BinaryRepr]])
// [Martin] Why do we need a cast here?