Files
kotlin/compiler/testData/codegen/bytecodeText/lazyCodegen/negateObjectCompChaing.kt
Mads Ager 057bdb3954 Generate better code for branches based on comparisons.
For comparison intrinsics and for instanceof checks, make
it possible to get the the stack value produced and branch
on that directly instead of materializing a boolean to
branch on from it.

That reduces code such as

```
    IF_CMPEQ L1
    CONST_0
    GOTO L2
L1: CONST_1
L2: IFEQ L3
```

to just one IF_CMP instruction.
2019-02-19 15:46:52 +01:00

11 lines
124 B
Kotlin
Vendored

val p: Int? = 1;
val z: Int? = 2;
fun test3() {
if (!!!(p!! < z!!)) {
val p = 1
}
}
// 2 IFNONNULL
// 3 IF