diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-02 14:36:18 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-02 14:36:18 +0000 |
commit | 5e34cf4f88844b16dcca5aadce9696c60802eebc (patch) | |
tree | 94e65f1bea1e8198b24e28629af2fd4452641430 /src/compiler/scala/tools/nsc/Main.scala | |
parent | 8f660e3ddaadbbc21055f942dbb8f132553f87ff (diff) | |
download | scala-5e34cf4f88844b16dcca5aadce9696c60802eebc.tar.gz scala-5e34cf4f88844b16dcca5aadce9696c60802eebc.tar.bz2 scala-5e34cf4f88844b16dcca5aadce9696c60802eebc.zip |
some changes to plug space leaks
Diffstat (limited to 'src/compiler/scala/tools/nsc/Main.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Main.scala | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/Main.scala b/src/compiler/scala/tools/nsc/Main.scala index 62fb2a0bdb..df27b1a738 100644 --- a/src/compiler/scala/tools/nsc/Main.scala +++ b/src/compiler/scala/tools/nsc/Main.scala @@ -32,12 +32,22 @@ object Main extends Object with EvalLoop { def errors() = reporter.errors - def resident(compiler: Global): unit = { - loop(line => { + def resident(compiler: Global): unit = + loop { line => val args = List.fromString(line, ' ') val command = new CompilerCommand(args, error, true) (new compiler.Run) compile command.files - }) + } + + def forever(compiler: Global): unit = { + var cnt = 0 + while (true) { + Console.println("Iteration: "+cnt) + cnt = cnt + 1 + val args = List("Global.scala") + val command = new CompilerCommand(args, error, true) + (new compiler.Run) compile command.files + } } def process(args: Array[String]): unit = { @@ -51,6 +61,8 @@ object Main extends Object with EvalLoop { else { try { object compiler extends Global(command.settings, reporter); + if (command.settings.Xgenerics.value) + forever(compiler) if (command.settings.resident.value) resident(compiler) else if (command.files.isEmpty) |