Skip to content

Commit

Permalink
Applied review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd committed Mar 13, 2024
1 parent 4a12745 commit 2dd4408
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 175 deletions.
34 changes: 17 additions & 17 deletions compiler/src/dotty/tools/backend/jvm/BackendUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BackendUtils(val postProcessor: PostProcessor) {
import bTypes.*
import coreBTypes.jliLambdaMetaFactoryAltMetafactoryHandle

lazy val classfileVersion: Int = BackendUtils.classfileVersionMap(compilerSettings.target)
lazy val classfileVersion: Int = BackendUtils.classfileVersionMap(compilerSettings.target.toInt)

lazy val extraProc: Int = {
import GenBCodeOps.addFlagIf
Expand Down Expand Up @@ -169,21 +169,21 @@ class BackendUtils(val postProcessor: PostProcessor) {
}

object BackendUtils {
lazy val classfileVersionMap = Map(
"8" -> asm.Opcodes.V1_8,
"9" -> asm.Opcodes.V9,
"10" -> asm.Opcodes.V10,
"11" -> asm.Opcodes.V11,
"12" -> asm.Opcodes.V12,
"13" -> asm.Opcodes.V13,
"14" -> asm.Opcodes.V14,
"15" -> asm.Opcodes.V15,
"16" -> asm.Opcodes.V16,
"17" -> asm.Opcodes.V17,
"18" -> asm.Opcodes.V18,
"19" -> asm.Opcodes.V19,
"20" -> asm.Opcodes.V20,
"21" -> asm.Opcodes.V21,
"22" -> asm.Opcodes.V22,
lazy val classfileVersionMap: Map[Int, Int] = Map(
8 -> asm.Opcodes.V1_8,
9 -> asm.Opcodes.V9,
10 -> asm.Opcodes.V10,
11 -> asm.Opcodes.V11,
12 -> asm.Opcodes.V12,
13 -> asm.Opcodes.V13,
14 -> asm.Opcodes.V14,
15 -> asm.Opcodes.V15,
16 -> asm.Opcodes.V16,
17 -> asm.Opcodes.V17,
18 -> asm.Opcodes.V18,
19 -> asm.Opcodes.V19,
20 -> asm.Opcodes.V20,
21 -> asm.Opcodes.V21,
22 -> asm.Opcodes.V22,
)
}
Loading

0 comments on commit 2dd4408

Please sign in to comment.