Cache hasLocalSource

This commit is contained in:
Tom Hvitved
2021-11-09 11:41:43 +01:00
parent c04e344192
commit 45412fa17f

View File

@@ -121,7 +121,8 @@ class LocalSourceNode extends Node {
LocalSourceNode backtrack(TypeBackTracker t2, TypeBackTracker t) { t2 = t.step(result, this) }
}
predicate hasLocalSource(Node sink, Node source) {
cached
private predicate hasLocalSource(Node sink, Node source) {
// Declaring `source` to be a `SourceNode` currently causes a redundant check in the
// recursive case, so instead we check it explicitly here.
source = sink and