JVM_IR more compact safe call chains (almost as old BE)

This commit is contained in:
Dmitry Petrov
2021-09-23 16:51:57 +03:00
committed by teamcityserver
parent f4eaf611c8
commit 0a67ab54fe
19 changed files with 699 additions and 123 deletions
@@ -0,0 +1,17 @@
fun test(a: Any?) =
a?.toString()?.hashCode() ?: 0
// 1 ALOAD
// 0 ASTORE
// 0 ISTORE
// 0 ILOAD
// 1 POP
// 0 valueOf
// JVM_IR_TEMPLATES
// 1 DUP
// 1 IFNULL
// JVM_TEMPLATES
// 2 DUP
// 2 IFNULL