10000 Support Java 9 bytecode by adding "-target:jvm-9" · scala/scala@46bf259 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46bf259

Browse files
committed
Support Java 9 bytecode by adding "-target:jvm-9"
1 parent 07d61ec commit 46bf259

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

project/ScalaOptionParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ object ScalaOptionParser {
106106
"-Ymacro-expand" -> List("discard", "none"),
107107
"-Yresolve-term-conflict" -> List("error", "object", "package"),
108108
"-g" -> List("line", "none", "notailcails", "source", "vars"),
109-
"-target" -> List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8"))
109+
"-target" -> List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8", "jvm-9"))
110110
private def multiChoiceSettingNames = Map[String, List[String]](
111111
"-Xlint" -> List("adapted-args", "nullary-unit", "inaccessible", "nullary-override", "infer-any", "missing-interpolator", "doc-detached", "private-shadow", "type-parameter-shadow", "poly-implicit-overload", "option-implicit", "delayedinit-select", "by-name-right-associative", "package-object-classes", "unsound-match", "stars-align"),
112112
"-language" -> List("help", "_", "dynamics", "postfixOps", "reflectiveCalls", "implicitConversions", "higherKinds", "existentials", "experimental.macros"),

src/compiler/scala/tools/ant/Scalac.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
9595

9696
/** Defines valid values for the `target` property. */
9797
object Target extends PermissibleValue {
98-
val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8")
98+
val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8", "jvm-9")
9999
}
100100

101101
/** Defines valid values for the `deprecation` and `unchecked` properties. */

src/compiler/scala/tools/nsc/Global.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
13231323
currentRun.reporting.deprecationWarning(NoPosition, s.name + " is deprecated: " + s.deprecationMessage.get, "")
13241324
}
13251325
val supportedTarget = "jvm-1.8"
1326-
if (settings.target.value != supportedTarget) {
1326+
if (settings.target.value != supportedTarget && settings.target.value != "jvm-9") {
13271327
currentRun.reporting.deprecationWarning(NoPosition, settings.target.name + ":" + settings.target.value + " is deprecated and has no effect, setting to " + supportedTarget, "2.12.0")
13281328
settings.target.value = supportedTarget
13291329
}

src/compiler/scala/tools/nsc/backend/jvm/analysis/BackendUtils.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ abstract class BackendUtils extends PerRunInit {
6262

6363
lazy val classfileVersion: LazyVar[Int] = perRunLazy(this)(compilerSettings.target match {
6464
case "jvm-1.8" => asm.Opcodes.V1_8
65+
case "jvm-9" => asm.Opcodes.V1_9
6566
})
6667

6768

src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ trait StandardScalaSettings {
3939
val optimise: BooleanSetting // depends on post hook which mutates other settings
4040
val print = BooleanSetting ("-print", "Print program with Scala-specific features removed.")
4141
val target = ChoiceSettingForcedDefault ("-target", "target", "Target platform for object files. All JVM 1.5 - 1.7 targets are deprecated.",
42-
List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8"), "jvm-1.8")
42+
List("jvm-1.5", "jvm-1.6", "jvm-1.7", "jvm-1.8", "jvm-9"), "jvm-1.8")
4343
val unchecked = BooleanSetting ("-unchecked", "Enable additional warnings where generated code depends on assumptions.")
4444
val uniqid = BooleanSetting ("-uniqid", "Uniquely tag all identifiers in debugging output.")
4545
val usejavacp = BooleanSetting ("-usejavacp", "Utilize the java.class.path in classpath resolution.")

0 commit comments

Comments
 (0)
0