mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
Had to edit some bytecodeText tests to account for the fact that JVM_IR no longer generates explicit initializations for ConstantValue fields, but NoConstantValueAttributeForNonConstVals is not the default yet.
43 lines
594 B
Kotlin
Vendored
43 lines
594 B
Kotlin
Vendored
val a = 2
|
|
|
|
fun main() {
|
|
// Generates IF_ICMPNE
|
|
do {
|
|
"loop"
|
|
} while (!(a == 42))
|
|
|
|
// Generates IF_ICMPNE
|
|
do {
|
|
"loop"
|
|
} while (a != 42)
|
|
|
|
// Generates IF_ICMPLE
|
|
do {
|
|
"loop"
|
|
} while (!(a > 42))
|
|
|
|
// Generates IF_ICMPLT
|
|
do {
|
|
"loop"
|
|
} while (!(a >= 42))
|
|
|
|
// Generates IF_ICMPGE
|
|
do {
|
|
"loop"
|
|
} while (!(a < 42))
|
|
|
|
// Generates IF_ICMPGT
|
|
do {
|
|
"loop"
|
|
} while (!(a <= 42))
|
|
}
|
|
|
|
//0 ICONST_0
|
|
//0 ICONST_1
|
|
//2 IF_ICMPNE
|
|
//1 IF_ICMPLE
|
|
//1 IF_ICMPLT
|
|
//1 IF_ICMPGE
|
|
//1 IF_ICMPGT
|
|
//6 IF
|
|
//0 GOTO |