[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,18 +79,33 @@ 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
for (index in 0 until output.size - 1) { var isLiftedUp = !lastIsNull
append(SEPARATOR) val platformItems = StringBuilder().apply {
append( for (index in 0 until output.size - 1) {
when { append(SEPARATOR)
output[index] == null -> '-' // absent append(
lastIsNull -> 'O' // original (not commonized) when {
else -> 'A' // actual (commonized) output[index] == null -> '-' // absent
} lastIsNull -> 'O' // original (not commonized)
) else -> {
isLiftedUp = false
'A' // actual (commonized)
}
}
)
}
} }
append(
when {
isLiftedUp -> 'L'
lastIsNull -> '-'
else -> 'E'
}
) // common
append(platformItems)
} }
writer.println(row) writer.println(row)