mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Ruby: Cache more predicates
This commit is contained in:
@@ -2724,7 +2724,7 @@ module MakeImpl<InputSig Lang> {
|
||||
pragma[noinline]
|
||||
ApHeadContent getHeadContent(Ap ap) { result = ap.getHead() }
|
||||
|
||||
predicate projectToHeadContent = getContentApprox/1;
|
||||
predicate projectToHeadContent = getContentApproxCached/1;
|
||||
|
||||
class ApOption = ApproxAccessPathFrontOption;
|
||||
|
||||
|
||||
@@ -975,6 +975,9 @@ module MakeImplCommon<InputSig Lang> {
|
||||
cached
|
||||
predicate paramMustFlow(ParamNode p, ArgNode arg) { localMustFlowStep+(p, arg) }
|
||||
|
||||
cached
|
||||
ContentApprox getContentApproxCached(Content c) { result = getContentApprox(c) }
|
||||
|
||||
cached
|
||||
newtype TCallContext =
|
||||
TAnyCallContext() or
|
||||
@@ -1885,7 +1888,7 @@ module MakeImplCommon<InputSig Lang> {
|
||||
Content getAHead() {
|
||||
exists(ContentApprox cont |
|
||||
this = TApproxFrontHead(cont) and
|
||||
cont = getContentApprox(result)
|
||||
cont = getContentApproxCached(result)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user