FIR CFA: align reading of labels with the way they're generated

UncaughtExceptionPath label out of a finally block matches every label
that is not handled by another edge, and a labeled edge from the middle
of a finally block aborts the jump and so should merge all available
data.
This commit is contained in:
pyos
2022-12-14 10:37:27 +01:00
committed by Dmitriy Novozhilov
parent d655147c8c
commit da018e9d06
4 changed files with 25 additions and 49 deletions
@@ -77,24 +77,12 @@ data class Edge(
}
sealed class EdgeLabel(val label: String?) {
open val isNormal: Boolean
get() = false
override fun toString(): String {
return label ?: ""
}
}
object NormalPath : EdgeLabel(label = null) {
override val isNormal: Boolean
get() = true
}
object LoopBackPath : EdgeLabel(label = null) {
override val isNormal: Boolean
get() = true
}
object NormalPath : EdgeLabel(label = null)
object UncaughtExceptionPath : EdgeLabel(label = "onUncaughtException")
// TODO: Label `return`ing edge with this.