summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/interactive/REPL.scala
diff options
context:
space:
mode:
authorMirco Dotta <mirco.dotta@typesafe.com>2012-10-10 09:29:30 +0200
committerMirco Dotta <mirco.dotta@typesafe.com>2012-10-10 09:41:16 +0200
commit4c7127d9acb1e0bae6f14a6b40019a535d057112 (patch)
treeecc4edc4463e7d24d6605630971e07c5e9dc4774 /src/compiler/scala/tools/nsc/interactive/REPL.scala
parente5127d94ef02cf71fdb9b95b24f8135c49d135ae (diff)
downloadscala-4c7127d9acb1e0bae6f14a6b40019a535d057112.tar.gz
scala-4c7127d9acb1e0bae6f14a6b40019a535d057112.tar.bz2
scala-4c7127d9acb1e0bae6f14a6b40019a535d057112.zip
Deprecated instrumentation API
The instrumentation logic needed by the Scala IDE Worksheet is currently part of the Scala project, but it doesn't need to be. I already have a PR ready for completely removing the instrumentation logic, but I considered it too risky at this point for 2.10.0 release (an oversight can lead to the impossibility of running the worksheet with Scala 2.10.0). For the moment, I believe it's better to deprecate the whole instrumentation API in 2.10.0, and the PR for removing the instrumentation logic will target 2.10.1 or 2.11.0. Besides deprecating the instrumentation API, this commit also raised visibility of `interruptsEnabled` member in `Global`. This change alone is sufficient for moving the instrumentation logic outside of the compiler, and it is needed because the Presentation Compiler thread should never be interrupted while instrumenting a source. This commit is related to SI-6458
Diffstat (limited to 'src/compiler/scala/tools/nsc/interactive/REPL.scala')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/REPL.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/REPL.scala b/src/compiler/scala/tools/nsc/interactive/REPL.scala
index afac5828e5..be837b32f3 100644
--- a/src/compiler/scala/tools/nsc/interactive/REPL.scala
+++ b/src/compiler/scala/tools/nsc/interactive/REPL.scala
@@ -92,6 +92,7 @@ object REPL {
val completeResult = new Response[List[comp.Member]]
val typedResult = new Response[comp.Tree]
val structureResult = new Response[comp.Tree]
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
val instrumentedResult = new Response[(String, Array[Char])]
def makePos(file: String, off1: String, off2: String) = {
@@ -124,6 +125,7 @@ object REPL {
* @param iContents An Array[Char] containing the instrumented source
* @return The name of the instrumented source file
*/
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
def writeInstrumented(iFullName: String, suffix: String, iContents: Array[Char]): String = {
val iSimpleName = iFullName drop ((iFullName lastIndexOf '.') + 1)
val iSourceName = iSimpleName + suffix
@@ -142,6 +144,7 @@ object REPL {
* and outputs in the right column, or None if the presentation compiler
* does not respond to askInstrumented.
*/
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
def instrument(arguments: List[String], line: Int): Option[(String, String)] = {
val source = toSourceFile(arguments.head)
// strip right hand side comment column and any trailing spaces from all lines