mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
- Turn some const conditions into non-const conditions - Make sure inlined const values are used where required (otherwise they are eliminated by POP backward propagation)
18 lines
523 B
Kotlin
Vendored
18 lines
523 B
Kotlin
Vendored
fun equals3(a: Int?, b: Int?) = a != null && b != null && a == b
|
|
|
|
fun equals4(a: Int?, b: Int?) = if (a is Int && b is Int) a == b else null!!
|
|
|
|
fun equals5(a: Any?, b: Any?) = if (a is Int && b is Int) a == b else null!!
|
|
|
|
fun less3(a: Int?, b: Int?) = a != null && b != null && a < b
|
|
|
|
fun less4(a: Int?, b: Int?) = if (a is Int && b is Int) a < b else true
|
|
|
|
fun less5(a: Any?, b: Any?) = if (a is Int && b is Int) a < b else true
|
|
|
|
// 3 Intrinsics\.areEqual
|
|
// 3 Intrinsics\.compare
|
|
// for compare:
|
|
// 3 IFGE
|
|
// 0 IF_ICMPGE
|