Optimize comparison with zero and null
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
fun main(p: String?) {
|
||||
if (p == null) {
|
||||
"then"
|
||||
} else {
|
||||
"else"
|
||||
}
|
||||
}
|
||||
|
||||
//0 ICONST_0
|
||||
//0 ICONST_1
|
||||
//0 ACONST_NULL
|
||||
//1 IFNONNULL
|
||||
//1 IF
|
||||
//1 GOTO
|
||||
Reference in New Issue
Block a user