From adb3c010d3b95094161bd6725b3e2077cad98879 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Tue, 26 Jul 2016 09:49:12 +0200 Subject: Reduce deprecations and warnings --- src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala | 8 ++++++++ src/compiler/scala/tools/nsc/plugins/Plugin.scala | 2 +- src/compiler/scala/tools/nsc/util/ClassPath.scala | 12 ++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala index 447ee209b5..fedacdac41 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala @@ -828,8 +828,10 @@ object LocalOptImpls { /** * Replace jumps to a sequence of GOTO instructions by a jump to the final destination. * + * {{{ * Jump l; [any ops]; l: GOTO m; [any ops]; m: GOTO n; [any ops]; n: NotGOTO; [...] * => Jump n; [rest unchanged] + * }}} * * If there's a loop of GOTOs, the initial jump is replaced by one of the labels in the loop. */ @@ -848,8 +850,10 @@ object LocalOptImpls { /** * Eliminates unnecessary jump instructions * + * {{{ * Jump l; [nops]; l: [...] * => POP*; [nops]; l: [...] + * }}} * * Introduces 0, 1 or 2 POP instructions, depending on the number of values consumed by the Jump. */ @@ -865,8 +869,10 @@ object LocalOptImpls { * If the "else" part of a conditional branch is a simple GOTO, negates the conditional branch * and eliminates the GOTO. * + * {{{ * CondJump l; [nops, no jump targets]; GOTO m; [nops]; l: [...] * => NegatedCondJump m; [nops, no jump targets]; [nops]; l: [...] + * }}} * * Note that no jump targets are allowed in the first [nops] section. Otherwise, there could * be some other jump to the GOTO, and eliminating it would change behavior. @@ -893,8 +899,10 @@ object LocalOptImpls { /** * Inlines xRETURN and ATHROW * + * {{{ * GOTO l; [any ops]; l: xRETURN/ATHROW * => xRETURN/ATHROW; [any ops]; l: xRETURN/ATHROW + * }}} * * inlining is only done if the GOTO instruction is not part of a try block, otherwise the * rewrite might change the behavior. For xRETURN, the reason is that return instructions may throw diff --git a/src/compiler/scala/tools/nsc/plugins/Plugin.scala b/src/compiler/scala/tools/nsc/plugins/Plugin.scala index 5caf7e41bf..ed1675e4cc 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugin.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugin.scala @@ -64,7 +64,7 @@ abstract class Plugin { true } - @deprecated("use Plugin#init instead", since="2.11") + @deprecated("use Plugin#init instead", since="2.11.0") def processOptions(options: List[String], error: String => Unit): Unit = { if (!options.isEmpty) error(s"Error: $name takes no options") } diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala index cef2fc4bbf..f286cfe246 100644 --- a/src/compiler/scala/tools/nsc/util/ClassPath.scala +++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala @@ -52,7 +52,7 @@ trait ClassPath { */ def asClassPathString: String = ClassPath.join(asClassPathStrings: _*) // for compatibility purposes - @deprecated("Use asClassPathString instead of this one", "2.11.5") + @deprecated("use asClassPathString instead of this one", "2.11.5") def asClasspathString: String = asClassPathString /** The whole sourcepath in the form of one String. @@ -128,10 +128,10 @@ object ClassPath { resources.asScala.filter(_.getProtocol == "jar").toList } - @deprecated("Shim for sbt's compiler interface", since = "2.12") + @deprecated("shim for sbt's compiler interface", since = "2.12.0") sealed abstract class ClassPathContext - @deprecated("Shim for sbt's compiler interface", since = "2.12") + @deprecated("shim for sbt's compiler interface", since = "2.12.0") sealed abstract class JavaContext } @@ -141,11 +141,11 @@ trait ClassRepresentation { def source: Option[AbstractFile] } -@deprecated("Shim for sbt's compiler interface", since = "2.12") +@deprecated("shim for sbt's compiler interface", since = "2.12.0") sealed abstract class DirectoryClassPath -@deprecated("Shim for sbt's compiler interface", since = "2.12") +@deprecated("shim for sbt's compiler interface", since = "2.12.0") sealed abstract class MergedClassPath -@deprecated("Shim for sbt's compiler interface", since = "2.12") +@deprecated("shim for sbt's compiler interface", since = "2.12.0") sealed abstract class JavaClassPath -- cgit v1.2.3