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