@@ -521,6 +521,11 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
521
521
522
522
private module CallSetOption = Option< CallSets:: ValueSet > ;
523
523
524
+ /**
525
+ * A set of call sites for which dispatch is affected by the call context.
526
+ *
527
+ * A `None` value indicates the empty set.
528
+ */
524
529
private class CallSet = CallSetOption:: Option ;
525
530
526
531
private module DispatchSetsInput implements MkSetsInputSig {
@@ -544,6 +549,15 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
544
549
545
550
private module DispatchSetsOption = Option< DispatchSets:: ValueSet > ;
546
551
552
+ /**
553
+ * A set of call edges that are allowed in the call context. This applies to
554
+ * all calls in the associated `CallSet`, in particular, this means that if
555
+ * a call has no associated edges in the `DispatchSet`, then either all
556
+ * edges are allowed or none are depending on whether the call is in the
557
+ * `CallSet`.
558
+ *
559
+ * A `None` value indicates the empty set.
560
+ */
547
561
private class DispatchSet = DispatchSetsOption:: Option ;
548
562
549
563
private predicate relevantCtx ( TCallEdge ctx ) {
@@ -795,9 +809,10 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
795
809
}
796
810
797
811
private LocalCallContext getLocalCallContext ( CallContext ctx ) {
798
- if exists ( getUnreachable ( ctx ) )
799
- then result = TSpecificLocalCall ( getUnreachable ( ctx ) )
800
- else result instanceof LocalCallContextAny
812
+ result = TSpecificLocalCall ( getUnreachable ( ctx ) )
813
+ or
814
+ not exists ( getUnreachable ( ctx ) ) and
815
+ result instanceof LocalCallContextAny
801
816
}
802
817
803
818
bindingset [ cc]
0 commit comments