mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Instead, flip the branch targets. This generates java byte code
such as:
L2
IFNE L3
ALOAD 0
INVOKEVIRTUAL A.getX ()F
GOTO L4
L3
instead of:
L2
IFNE L3
ICONST_1
GOTO L4
L3
ICONST_0
L4
IFEQ L5
ALOAD 0
INVOKEVIRTUAL A.getX ()F
GOTO L6
L5
9 lines
94 B
Kotlin
Vendored
9 lines
94 B
Kotlin
Vendored
val two = 2
|
|
|
|
fun test2() {
|
|
val p = 1 < two
|
|
if (!p) {
|
|
val p = 1
|
|
}
|
|
}
|
|
// 2 IF |