mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Convert SwitchCodegen to Kotlin, prettify and optimize codegen
This commit is contained in:
@@ -9,6 +9,6 @@ fun box(): String {
|
||||
return if (b) "OK" else "FAIL"
|
||||
}
|
||||
|
||||
// 0 TABLESWITCH
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 ATHROW
|
||||
// 1 TABLESWITCH
|
||||
// 0 LOOKUPSWITCH
|
||||
// 1 ATHROW
|
||||
|
||||
@@ -7,6 +7,6 @@ fun box(): String {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 TABLESWITCH
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 TABLESWITCH
|
||||
// 0 LOOKUPSWITCH
|
||||
// 1 ATHROW
|
||||
|
||||
@@ -12,5 +12,4 @@ fun foo2(x: Int): Boolean {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 TABLESWITCH
|
||||
// 2 LOOKUPSWITCH
|
||||
// 2 TABLESWITCH
|
||||
|
||||
@@ -18,4 +18,4 @@ fun box() : String {
|
||||
}
|
||||
}
|
||||
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 TABLESWITCH
|
||||
|
||||
@@ -24,4 +24,4 @@ fun box(): String {
|
||||
return res
|
||||
}
|
||||
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 TABLESWITCH
|
||||
|
||||
@@ -24,4 +24,4 @@ fun box(): String {
|
||||
return "O".doTheThing() + Level.K.doTheThing()
|
||||
}
|
||||
|
||||
// 1 LOOKUPSWITCH
|
||||
// 1 TABLESWITCH
|
||||
|
||||
Reference in New Issue
Block a user