Optimize more redundant kotlin/jvm/internal/Refs

The number of initializations of the `value` field before the live range
begins does not really matter so long as we insert a write of a default
value to the local if there were none.
This commit is contained in:
pyos
2020-03-02 12:49:05 +01:00
committed by Dmitry Petrov
parent 7e6d080123
commit ed83e3ccef
19 changed files with 62 additions and 97 deletions
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JVM_IR
inline fun <reified T> foo(default: T): T {
val t: T
run {
@@ -13,6 +11,6 @@ fun test() {
}
// two in foo and two in test
// 4 ASTORE 2
// 1 LOCALVARIABLE t\$iv Ljava/lang/Object; L3 L.* 2
// 1 LOCALVARIABLE t Ljava/lang/Object;
// 1 LOCALVARIABLE t\$iv Ljava/lang/Object;