summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-10-16 10:58:16 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-10-16 10:58:16 -0700
commit8aeae6231600a9bae14299bc92c8a6109c67c5af (patch)
treece4f3be44a4a3d8c84e7c95b9dfa06d164199dd2
parent831dcb9c099e2c3f58d1bc0dd26ba6b6a83b45f2 (diff)
parent340e28aa20fe916bd3fd91d4ad87dc7a50a84aea (diff)
downloadscala-8aeae6231600a9bae14299bc92c8a6109c67c5af.tar.gz
scala-8aeae6231600a9bae14299bc92c8a6109c67c5af.tar.bz2
scala-8aeae6231600a9bae14299bc92c8a6109c67c5af.zip
Merge pull request #1504 from dotta/backport/deprecated-instrumentation-api
Deprecated instrumentation API
-rw-r--r--src/compiler/scala/tools/nsc/interactive/CompilerControl.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala3
-rw-r--r--src/compiler/scala/tools/nsc/interactive/REPL.scala3
-rw-r--r--src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala1
-rw-r--r--src/compiler/scala/tools/nsc/scratchpad/Mixer.scala1
-rw-r--r--src/compiler/scala/tools/nsc/scratchpad/SourceInserter.scala1
-rw-r--r--src/library/scala/runtime/WorksheetSupport.scala1
7 files changed, 11 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
index abe077fb6e..cb66e2b4d2 100644
--- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
+++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
@@ -221,6 +221,7 @@ trait CompilerControl { self: Global =>
* everything is brought up to date in a regular type checker run.
* @param response The response.
*/
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
def askInstrumented(source: SourceFile, line: Int, response: Response[(String, Array[Char])]) =
postWorkItem(new AskInstrumentedItem(source, line, response))
@@ -388,6 +389,7 @@ trait CompilerControl { self: Global =>
response raise new MissingResponse
}
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
case class AskInstrumentedItem(val source: SourceFile, line: Int, response: Response[(String, Array[Char])]) extends WorkItem {
def apply() = self.getInstrumented(source, line, response)
override def toString = "getInstrumented "+source
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 886d6b2c2e..572d520619 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -205,7 +205,7 @@ class Global(settings: Settings, reporter: Reporter, projectName: String = "")
protected[interactive] var minRunId = 1
- private var interruptsEnabled = true
+ private[interactive] var interruptsEnabled = true
private val NoResponse: Response[_] = new Response[Any]
@@ -1039,6 +1039,7 @@ class Global(settings: Settings, reporter: Reporter, projectName: String = "")
}
}
+ @deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
def getInstrumented(source: SourceFile, line: Int, response: Response[(String, Array[Char])]) =
try {
interruptsEnabled = false
diff --git a/src/compiler/scala/tools/nsc/interactive/REPL.scala b/src/compiler/scala/tools/nsc/interactive/REPL.scala
index 5e48811b01..5eec664c0a 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) = {
@@ -120,6 +121,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
@@ -138,6 +140,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
diff --git a/src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala b/src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala
index 657d3c44b6..ffc142fba7 100644
--- a/src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala
+++ b/src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala
@@ -6,6 +6,7 @@ import collection.mutable.ArrayBuffer
import util.Chars.{isLineBreakChar, isWhitespace}
import ast.parser.Tokens._
+@deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
trait ScratchPadMaker { self: Global =>
import definitions._
diff --git a/src/compiler/scala/tools/nsc/scratchpad/Mixer.scala b/src/compiler/scala/tools/nsc/scratchpad/Mixer.scala
index 251f377905..af59f78b29 100644
--- a/src/compiler/scala/tools/nsc/scratchpad/Mixer.scala
+++ b/src/compiler/scala/tools/nsc/scratchpad/Mixer.scala
@@ -6,6 +6,7 @@ import scala.runtime.ScalaRunTime.stringOf
import java.lang.reflect.InvocationTargetException
import collection.mutable.ArrayBuffer
+@deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
class Mixer {
protected val stdSeparator = "//> "
diff --git a/src/compiler/scala/tools/nsc/scratchpad/SourceInserter.scala b/src/compiler/scala/tools/nsc/scratchpad/SourceInserter.scala
index 1b2e8330e5..d022a3641c 100644
--- a/src/compiler/scala/tools/nsc/scratchpad/SourceInserter.scala
+++ b/src/compiler/scala/tools/nsc/scratchpad/SourceInserter.scala
@@ -6,6 +6,7 @@ import util.SourceFile
import util.Chars._
+@deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
object SourceInserter {
def stripRight(cs: Array[Char]): Array[Char] = {
val lines =
diff --git a/src/library/scala/runtime/WorksheetSupport.scala b/src/library/scala/runtime/WorksheetSupport.scala
index a003bba034..016a0d04e0 100644
--- a/src/library/scala/runtime/WorksheetSupport.scala
+++ b/src/library/scala/runtime/WorksheetSupport.scala
@@ -4,6 +4,7 @@ import scala.runtime.ScalaRunTime.stringOf
/** A utility object that's needed by the code that executes a worksheet.
*/
+@deprecated("SI-6458: Instrumentation logic will be moved out of the compiler.","2.10.0")
object WorksheetSupport {
/** The offset in the source which should be printed */