summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/util/PathResolver.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-03 04:11:32 +0000
committerPaul Phillips <paulp@improving.org>2010-10-03 04:11:32 +0000
commit2c59afc2c15ddcd124fd175eb30c0cdf9d98463b (patch)
tree591c9315baea0f711da69c6cd7693b4952286705 /src/compiler/scala/tools/util/PathResolver.scala
parent2fefb37220f82300e2aa44442f1a42261d65e359 (diff)
downloadscala-2c59afc2c15ddcd124fd175eb30c0cdf9d98463b.tar.gz
scala-2c59afc2c15ddcd124fd175eb30c0cdf9d98463b.tar.bz2
scala-2c59afc2c15ddcd124fd175eb30c0cdf9d98463b.zip
Removes a bunch of private functions which are ...
Removes a bunch of private functions which are never called. While based on the nature of "private" one can generally feel pretty good that such a thing is safe, there is always a chance the author had some future use in mind. On that note I draw your attention in particular to: (martin) Typers#stabilizedType: it "sounds" important, but most of it has been commented out since 2007 and the little stub part is a never called private. (iulian) SpecializeTypes#makeTypeArguments: similarly sounds like a cornerstone of a transformation until one notices it isn't used. Unused methods are "attractive nuisances" for anyone (like myself) who has to figure out how the compiler works by studying the compiler, for reasons which are no doubt obvious. No review except as noted.
Diffstat (limited to 'src/compiler/scala/tools/util/PathResolver.scala')
-rw-r--r--src/compiler/scala/tools/util/PathResolver.scala9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/util/PathResolver.scala b/src/compiler/scala/tools/util/PathResolver.scala
index d2cb5e74c0..b2b47fe625 100644
--- a/src/compiler/scala/tools/util/PathResolver.scala
+++ b/src/compiler/scala/tools/util/PathResolver.scala
@@ -20,11 +20,6 @@ import PartialFunction.condOpt
object PathResolver {
def firstNonEmpty(xs: String*) = xs find (_ != "") getOrElse ""
- private def fileOpt(f: Path): Option[String] = f ifFile (_.path)
- private def dirOpt(d: Path): Option[String] = d ifDirectory (_.path)
- private def expandToPath(p: Path) = join(ClassPath.expandPath(p.path, true): _*)
- private def expandToContents(p: Path) = join(ClassPath.expandDir(p.path): _*)
-
/** Map all classpath elements to absolute paths and reconstruct the classpath.
*/
def makeAbsolute(cp: String) = ClassPath.map(cp, x => Path(x).toAbsolute.path)
@@ -43,10 +38,6 @@ object PathResolver {
import scala.collection.JavaConversions._
System.getProperties find (_._1 endsWith ".boot.class.path") map (_._2) getOrElse ""
}
- private def searchForScalaHome = {
- for (url <- ScalaClassLoader originOfClass classOf[ScalaObject] ; if url.getProtocol == "file") yield
- File(url.getFile).parent.path
- } getOrElse ""
/** Environment variables which java pays attention to so it
* seems we do as well.