Skip to content

Commit 03d104d

Browse files
authored
Merge pull request #11293 from dotty-staging/asm-9
Upgrade to ASM 9.0
2 parents 7ded834 + 9fed887 commit 03d104d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ trait BCodeIdiomatic {
3939
case (None, None) => "8" // least supported version by default
4040

4141

42+
// Keep synchronized with `minTargetVersion` and `maxTargetVersion` in ScalaSettings
4243
lazy val classfileVersion: Int = target match {
4344
case "8" => asm.Opcodes.V1_8
4445
case "9" => asm.Opcodes.V9
@@ -48,6 +49,7 @@ trait BCodeIdiomatic {
4849
case "13" => asm.Opcodes.V13
4950
case "14" => asm.Opcodes.V14
5051
case "15" => asm.Opcodes.V15
52+
case "16" => asm.Opcodes.V16
5153
}
5254

5355
lazy val majorVersion: Int = (classfileVersion & 0xFF)

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ trait CommonScalaSettings { self: Settings.SettingGroup =>
7272
}
7373

7474
class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
75+
// Keep synchronized with `classfileVersion` in `BCodeIdiomatic`
7576
private val minTargetVersion = 8
76-
private val maxTargetVersion = 15
77+
private val maxTargetVersion = 16
7778

7879
private def supportedTargetVersions: List[String] =
7980
(minTargetVersion to maxTargetVersion).toList.map(_.toString)

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ object Build {
491491

492492
// get libraries onboard
493493
libraryDependencies ++= Seq(
494-
"org.scala-lang.modules" % "scala-asm" % "7.3.1-scala-1", // used by the backend
494+
"org.scala-lang.modules" % "scala-asm" % "9.0.0-scala-1", // used by the backend
495495
Dependencies.oldCompilerInterface, // we stick to the old version to avoid deprecation warnings
496496
"org.jline" % "jline-reader" % "3.15.0", // used by the REPL
497497
"org.jline" % "jline-terminal" % "3.15.0",

0 commit comments

Comments
 (0)