diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-07-12 08:42:30 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-07-12 08:42:30 +0000 |
commit | 2906c10f80eefef9f9feada239968ecbd251c2cc (patch) | |
tree | 534f759bd7160c06ff698161d507beb969862965 /src/compiler | |
parent | 02fb5be2df9a94f871832db1f8a4dc5a20eb2078 (diff) | |
download | scala-2906c10f80eefef9f9feada239968ecbd251c2cc.tar.gz scala-2906c10f80eefef9f9feada239968ecbd251c2cc.tar.bz2 scala-2906c10f80eefef9f9feada239968ecbd251c2cc.zip |
added a -savecompiled option
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/GenericRunnerCommand.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/GenericRunnerSettings.scala | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala index b082e0c7a7..4f46d2848b 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala @@ -45,7 +45,8 @@ class GenericRunnerCommand(allargs: List[String], error: String => Unit) { parseArguments val usageMessage = { - "scala [ <compiler-option> | -howtorun:how ]... [<torun> <arguments>]\n" + + "scala [ <compiler-option> | -howtorun:how | -savecompiled ]... \n " + + " [<torun> <arguments>]\n" + "\n" + "<compiler-option>'s are as for scalac; see scalac -help.\n" + "<torun>, if present, is an object or script file to run.\n" + @@ -53,6 +54,8 @@ class GenericRunnerCommand(allargs: List[String], error: String => Unit) { "-howtorun allows explicitly specifying how to run <torun>:\n" + " script: it is a script file\n" + " object: it is an object name\n" + - " guess: (the default) try to guess\n" + " guess: (the default) try to guess\n" + + "If -savecompiled is specified, then try to cache the compilation\n" + + "of any script file that is run." } } diff --git a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala index 52c17aba6c..297e8c107d 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerSettings.scala @@ -11,8 +11,13 @@ class GenericRunnerSettings(error: String => Unit) extends Settings(error) { val howtorun = ChoiceSetting( - "howtorun", + "-howtorun", "how to run the specified code", List("guess", "object", "script"), "guess") + + val savecompiled = + BooleanSetting( + "-savecompiled", + "save the compiled script (assumes -howtorun script)") } |