mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +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.
7 lines
108 B
Kotlin
Vendored
7 lines
108 B
Kotlin
Vendored
fun test(x: String?) {
|
|
if (x !is String) return
|
|
|
|
if (x == null) println("dead code")
|
|
}
|
|
|
|
// 0 println |