Convert SwitchCodegen to Kotlin, prettify and optimize codegen
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
+1
-2
@@ -12,5 +12,4 @@ fun foo2(x: Int): Boolean {
|
||||
}
|
||||
}
|
||||
|
||||
// 0 TABLESWITCH
|
||||
// 2 LOOKUPSWITCH
|
||||
// 2 TABLESWITCH
|
||||
|
||||
+1
-1
@@ -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