diff options
author | mpociecha <michal.pociecha@gmail.com> | 2014-11-28 17:36:00 +0100 |
---|---|---|
committer | mpociecha <michal.pociecha@gmail.com> | 2014-11-28 18:05:35 +0100 |
commit | 74483771dcdfc963b28325d8ea3698df273370a1 (patch) | |
tree | c210b4902091f33b81093b1c80e2834d13a94b7f /src/compiler/scala/reflect/macros | |
parent | d34388c1e8fad289a6198b127c6ae92c296d9246 (diff) | |
download | scala-74483771dcdfc963b28325d8ea3698df273370a1.tar.gz scala-74483771dcdfc963b28325d8ea3698df273370a1.tar.bz2 scala-74483771dcdfc963b28325d8ea3698df273370a1.zip |
Abstract over ClassPath and ClassRep
This commit is intended to create the possibility to plug in into
the compiler an alternative classpath representation which would be
possibly more efficient, use less memory etc. Such an implementation
- at least at the beginning - should exist next to the currently
existing one and be possible to turn on using a flag.
Several places in the compiler have a direct dependency on the
classpath implementation. Examples include backend's icode generator
and reader, SymbolLoaders, ClassfileParser. After closer inspection,
one realizes that all those places depend only on a very small subset
of classpath logic: they need to lookup classes from classpath. Hence
there's introduced ClassFileLookup trait that encapsulates that
functionality. The ClassPath extends that trait and an alternative
one also must do it.
There's also added ClassRepresentation - the base trait for ClassRep
(the inner class of ClassPath). Thanks to that the compiler uses
a type which is not directly related to the particular classpath
representation as it was doing until now.
Diffstat (limited to 'src/compiler/scala/reflect/macros')
-rw-r--r-- | src/compiler/scala/reflect/macros/contexts/Infrastructure.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/macros/contexts/Infrastructure.scala b/src/compiler/scala/reflect/macros/contexts/Infrastructure.scala index df7aa4d2be..7088058145 100644 --- a/src/compiler/scala/reflect/macros/contexts/Infrastructure.scala +++ b/src/compiler/scala/reflect/macros/contexts/Infrastructure.scala @@ -12,5 +12,5 @@ trait Infrastructure { def compilerSettings: List[String] = universe.settings.recreateArgs - def classPath: List[java.net.URL] = global.classPath.asURLs + def classPath: List[java.net.URL] = global.classPath.asURLs.toList } |