mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
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.
11 lines
124 B
Kotlin
Vendored
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
|