mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Cache a few call-graph predicates
We DON'T want to recompute these ones for sure!
This commit is contained in:
@@ -1039,6 +1039,7 @@ predicate resolveClassInstanceCall(CallNode call, Function target, Node self) {
|
||||
/**
|
||||
* Holds if `call` is a call to the `target`, with call-type `type`.
|
||||
*/
|
||||
cached
|
||||
predicate resolveCall(ControlFlowNode call, Function target, CallType type) {
|
||||
type instanceof CallTypePlainFunction and
|
||||
call.(CallNode).getFunction() = functionTracker(target).asCfgNode() and
|
||||
@@ -1114,6 +1115,7 @@ predicate normalCallArg(CallNode call, Node arg, ArgumentPosition apos) {
|
||||
* Note: If `Bar.meth` and `Foo.meth` resolves to the same function, we will end up
|
||||
* sending both `self` arguments to that function, which is by definition the right thing to do.
|
||||
*/
|
||||
cached
|
||||
predicate getCallArg(
|
||||
ControlFlowNode call, Function target, CallType type, Node arg, ArgumentPosition apos
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user