@@ -20,56 +20,58 @@ private newtype TEdgeKind =
20
20
* `Instruction` or `IRBlock` has at most one successor of any single
21
21
* `EdgeKind`.
22
22
*/
23
- abstract class EdgeKind extends TEdgeKind {
23
+ abstract private class EdgeKindImpl extends TEdgeKind {
24
24
/** Gets a textual representation of this edge kind. */
25
25
abstract string toString ( ) ;
26
26
}
27
27
28
+ final class EdgeKind = EdgeKindImpl ;
29
+
28
30
/**
29
31
* A "goto" edge, representing the unconditional successor of an `Instruction`
30
32
* or `IRBlock`.
31
33
*/
32
- class GotoEdge extends EdgeKind , TGotoEdge {
34
+ class GotoEdge extends EdgeKindImpl , TGotoEdge {
33
35
final override string toString ( ) { result = "Goto" }
34
36
}
35
37
36
38
/**
37
39
* A "true" edge, representing the successor of a conditional branch when the
38
40
* condition is non-zero.
39
41
*/
40
- class TrueEdge extends EdgeKind , TTrueEdge {
42
+ class TrueEdge extends EdgeKindImpl , TTrueEdge {
41
43
final override string toString ( ) { result = "True" }
42
44
}
43
45
44
46
/**
45
47
* A "false" edge, representing the successor of a conditional branch when the
46
48
* condition is zero.
47
49
*/
48
- class FalseEdge extends EdgeKind , TFalseEdge {
50
+ class FalseEdge extends EdgeKindImpl , TFalseEdge {
49
51
final override string toString ( ) { result = "False" }
50
52
}
51
53
52
54
/**
53
55
* An "exception" edge, representing the successor of an instruction when that
54
56
* instruction's evaluation throws an exception.
55
57
*/
56
- class ExceptionEdge extends EdgeKind , TExceptionEdge {
58
+ class ExceptionEdge extends EdgeKindImpl , TExceptionEdge {
57
59
final override string toString ( ) { result = "Exception" }
58
60
}
59
61
60
62
/**
61
63
* A "default" edge, representing the successor of a `Switch` instruction when
62
64
* none of the case values matches the condition value.
63
65
*/
64
- class DefaultEdge extends EdgeKind , TDefaultEdge {
66
+ class DefaultEdge extends EdgeKindImpl , TDefaultEdge {
65
67
final override string toString ( ) { result = "Default" }
66
68
}
67
69
68
70
/**
69
71
* A "case" edge, representing the successor of a `Switch` instruction when the
70
72
* the condition value matches a corresponding `case` label.
71
73
*/
72
- class CaseEdge extends EdgeKind , TCaseEdge {
74
+ class CaseEdge extends EdgeKindImpl , TCaseEdge {
73
75
string minValue ;
74
76
string maxValue ;
75
77
0 commit comments