Skip to content

Commit 9038296

Browse files
committed
Remove unused files and type aliases
1 parent 1fd85d7 commit 9038296

File tree

4 files changed

+2
-79
lines changed

4 files changed

+2
-79
lines changed

compiler/src/dotty/tools/io/DaemonThreadFactory.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

compiler/src/dotty/tools/io/Fileish.scala

Lines changed: 0 additions & 34 deletions
This file was deleted.

compiler/src/dotty/tools/io/Jar.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Jar(file: File) extends Iterable[JarEntry] {
4040

4141
protected def errorFn(msg: String): Unit = Console println msg
4242

43+
private implicit def enrichManifest(m: JManifest): Jar.WManifest = Jar.WManifest(m)
44+
4345
lazy val jarFile = new JarFile(file.jfile)
4446
lazy val manifest = withJarInput(s => Option(s.getManifest))
4547

@@ -65,7 +67,6 @@ class Jar(file: File) extends Iterable[JarEntry] {
6567
Iterator continually in.getNextJarEntry() takeWhile (_ != null) foreach f
6668
}
6769
override def iterator: Iterator[JarEntry] = this.toList.iterator
68-
def fileishIterator: Iterator[Fileish] = jarFile.entries.asScala map (x => Fileish(x, () => getEntryStream(x)))
6970

7071
private def getEntryStream(entry: JarEntry) = jarFile getInputStream entry match {
7172
case null => errorFn("No such entry: " + entry) ; null

compiler/src/dotty/tools/io/package.scala

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,10 @@ package object io {
2121
type ManifestResources = scala.reflect.io.ManifestResources
2222
type Path = scala.reflect.io.Path
2323
val Path = scala.reflect.io.Path
24-
val Streamable = scala.reflect.io.Streamable
2524
type VirtualDirectory = scala.reflect.io.VirtualDirectory
2625
type VirtualFile = scala.reflect.io.VirtualFile
2726
type ZipArchive = scala.reflect.io.ZipArchive
28-
val ZipArchive = scala.reflect.io.ZipArchive
2927
type FileZipArchive = scala.reflect.io.FileZipArchive
3028
type JManifest = java.util.jar.Manifest
3129
type JFile = java.io.File
32-
33-
implicit def enrichManifest(m: JManifest): Jar.WManifest = Jar.WManifest(m)
34-
private lazy val daemonThreadPool = DaemonThreadFactory.newPool()
35-
36-
def runnable(body: => Unit): Runnable = new Runnable { override def run() = body }
37-
def callable[T](body: => T): Callable[T] = new Callable[T] { override def call() = body }
38-
def spawn[T](body: => T): Future[T] = daemonThreadPool submit callable(body)
39-
def submit(runnable: Runnable) = daemonThreadPool submit runnable
40-
41-
// Create, start, and return a daemon thread
42-
def daemonize(body: => Unit): Thread = newThread(_ setDaemon true)(body)
43-
def newThread(f: Thread => Unit)(body: => Unit): Thread = {
44-
val thread = new Thread(runnable(body))
45-
f(thread)
46-
thread.start
47-
thread
48-
}
49-
50-
// Set a timer to execute the given code.
51-
def timer(seconds: Int)(body: => Unit): Timer = {
52-
val alarm = new Timer(true) // daemon
53-
val tt = new TimerTask { def run() = body }
54-
55-
alarm.schedule(tt, seconds * 1000)
56-
alarm
57-
}
5830
}

0 commit comments

Comments
 (0)