aboutsummaryrefslogtreecommitdiff
path: root/stage1/Stage1Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-13 03:18:18 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-19 21:13:48 -0400
commitc095f435b68272d4ae0409ab4c9466145609710e (patch)
tree189f0f2755d8fd2e6af3eec9d514c29b3cebdef5 /stage1/Stage1Lib.scala
parentca7e166e09776410ef39e2808aab6a3fdd1e7911 (diff)
downloadcbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.gz
cbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.bz2
cbt-c095f435b68272d4ae0409ab4c9466145609710e.zip
Refactored ClassLoaderCache to use key locked cache to pave the way for caching classloaders hierarchically without deadlocks
Diffstat (limited to 'stage1/Stage1Lib.scala')
-rw-r--r--stage1/Stage1Lib.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index d24ba52..6a8a0ba 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -30,7 +30,7 @@ object TrappedExitCode{
}
}
-case class Context( cwd: File, args: Seq[String], logger: Logger )
+case class Context( cwd: File, args: Seq[String], logger: Logger, classLoaderCache: ClassLoaderCache )
class BaseLib{
def realpath(name: File) = new File(Paths.get(name.getAbsolutePath).normalize.toString)
@@ -130,6 +130,7 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{
files: Seq[File],
compileTarget: File,
classpath: ClassPath,
+ classLoaderCache: ClassLoaderCache,
extraArgs: Seq[String] = Seq()
)( zincVersion: String, scalaVersion: String ): Unit = {
@@ -176,7 +177,7 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{
"-cp", cp,
"-d", compileTarget.toString
) ++ extraArgs.map("-S"++_) ++ files.map(_.toString),
- zinc.classLoader
+ zinc.classLoader(classLoaderCache)
)
}