mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +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.
38 lines
450 B
Kotlin
Vendored
38 lines
450 B
Kotlin
Vendored
val a = 2
|
|
|
|
fun main() {
|
|
// Generates IFEQ
|
|
do {
|
|
"loop"
|
|
} while (a == 0)
|
|
|
|
// Generates IFGT
|
|
do {
|
|
"loop"
|
|
} while (a > 0)
|
|
|
|
// Generates IFGE
|
|
do {
|
|
"loop"
|
|
} while (a >= 0)
|
|
|
|
// Generates IFLT
|
|
do {
|
|
"loop"
|
|
} while (a < 0)
|
|
|
|
// Generates IFLE
|
|
do {
|
|
"loop"
|
|
} while (a <= 0)
|
|
}
|
|
|
|
//0 ICONST_0
|
|
//0 ICONST_1
|
|
//1 IFEQ
|
|
//1 IFLE
|
|
//1 IFLT
|
|
//1 IFGE
|
|
//1 IFGT
|
|
//5 IF
|
|
//0 GOTO |