[Commonizer] Update stats collector to report lifted up declarations

This commit is contained in:
Dmitriy Dolovov
2020-05-27 15:55:20 +07:00
parent 9f31931bb8
commit 45260cee1e
@@ -79,20 +79,35 @@ class NativeStatsCollector(
append(SEPARATOR) append(SEPARATOR)
append(firstNotNull.declarationType) // readable declaration type append(firstNotNull.declarationType) // readable declaration type
append(SEPARATOR) append(SEPARATOR)
append(if (lastIsNull) '-' else 'E') // common
var isLiftedUp = !lastIsNull
val platformItems = StringBuilder().apply {
for (index in 0 until output.size - 1) { for (index in 0 until output.size - 1) {
append(SEPARATOR) append(SEPARATOR)
append( append(
when { when {
output[index] == null -> '-' // absent output[index] == null -> '-' // absent
lastIsNull -> 'O' // original (not commonized) lastIsNull -> 'O' // original (not commonized)
else -> 'A' // actual (commonized) else -> {
isLiftedUp = false
'A' // actual (commonized)
}
} }
) )
} }
} }
append(
when {
isLiftedUp -> 'L'
lastIsNull -> '-'
else -> 'E'
}
) // common
append(platformItems)
}
writer.println(row) writer.println(row)
} }