Test: FIR CFA: sort edges by style & target node id

This commit is contained in:
pyos
2022-11-29 15:12:05 +01:00
committed by Dmitriy Novozhilov
parent 7ee1b75e43
commit faf0129a5d
89 changed files with 662 additions and 694 deletions
@@ -148,13 +148,13 @@ object UncaughtExceptionPath : EdgeLabel(label = "onUncaughtException")
class LoopPath(
firLoopJump: FirLoopJump
) : EdgeLabel("\"" + (if (firLoopJump is FirBreakExpression) "break" else "continue") +
(firLoopJump.target.labeledElement.label?.let { "@${it.name}" } ?: "") + "\"")
) : EdgeLabel((if (firLoopJump is FirBreakExpression) "break" else "continue") +
(firLoopJump.target.labeledElement.label?.let { "@${it.name}" } ?: ""))
// TODO: Label `return`ing edge with this.
class ReturnPath(
returnTargetSymbol: FirFunctionSymbol<*>
) : EdgeLabel(label = "\"return@${returnTargetSymbol.callableId}\"")
) : EdgeLabel(label = "return@${returnTargetSymbol.callableId}")
enum class EdgeKind(
val usedInDfa: Boolean, // propagate flow to alive nodes