Compare commits

...

8 Commits

9 changed files with 14 additions and 3 deletions

View File

@@ -403,6 +403,7 @@ private module Cached {
}
cached
pragma[no_dynamic_join_order]
Instruction getChiInstructionTotalOperand(ChiInstruction chiInstr) {
exists(
Alias::VirtualVariable vvar, OldInstruction oldInstr, OldBlock defBlock, int defRank,

View File

@@ -403,6 +403,7 @@ private module Cached {
}
cached
pragma[no_dynamic_join_order]
Instruction getChiInstructionTotalOperand(ChiInstruction chiInstr) {
exists(
Alias::VirtualVariable vvar, OldInstruction oldInstr, OldBlock defBlock, int defRank,

View File

@@ -572,6 +572,7 @@ class Method extends Function {
* Note that all methods implement themselves, and that unlike the predicate `implements`
* this does allow interface methods to implement other interfaces.
*/
pragma[no_dynamic_join_order]
predicate implementsIncludingInterfaceMethods(Method m) {
this = m
or

View File

@@ -120,6 +120,7 @@ private module Dispatch {
* Gets a viable implementation of the method called in the given method access.
*/
cached
pragma[no_dynamic_join_order]
Method viableImpl_v2(MethodCall ma) {
result = viableImpl_v2_cand(pragma[only_bind_into](ma)) and
exists(Method def, RefType t, boolean exact |

View File

@@ -1679,7 +1679,7 @@ module DataFlow {
*/
predicate localFieldStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(ClassNode cls, string prop |
pred = AccessPath::getAnAssignmentTo(cls.getADirectSuperClass*().getAReceiverNode(), prop) or
pred = AccessPath::getAnAssignmentTo(pragma[only_bind_out](cls.getADirectSuperClass*().getAReceiverNode()), prop) or
pred = cls.getInstanceMethod(prop)
|
succ = AccessPath::getAReferenceTo(cls.getAReceiverNode(), prop)

View File

@@ -293,7 +293,7 @@ class TypeBackTracker extends TTypeBackTracker {
TypeBackTracker step(DataFlow::SourceNode pred, DataFlow::SourceNode succ) {
exists(StepSummary summary |
StepSummary::step(pred, succ, summary) and
this = result.prepend(summary)
this = result.prepend(pragma[only_bind_into](summary))
)
}

View File

@@ -927,6 +927,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
* candidate for the origin of a summary.
*/
pragma[nomagic]
pragma[no_dynamic_join_order]
predicate parameterMayFlowThrough(ParamNodeEx p, Ap ap) {
exists(DataFlowCallable c, ReturnKindExt kind |
throughFlowNodeCand(p) and
@@ -1497,6 +1498,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
}
pragma[nomagic]
pragma[no_dynamic_join_order]
private predicate fwdFlow0(
NodeEx node, FlowState state, Cc cc, SummaryCtx summaryCtx, Typ t, Ap ap, ApApprox apa
) {

View File

@@ -280,6 +280,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
* callable of `lambdaCall`.
*/
pragma[nomagic]
pragma[no_dynamic_join_order]
predicate revLambdaFlow(
DataFlowCall lambdaCall, LambdaCallKind kind, Node node, DataFlowType t, boolean toReturn,
boolean toJump, DataFlowCallOption lastCall
@@ -982,6 +983,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
predicate expectsContentCached(Node n, ContentSet c) { expectsContent(n, c) }
cached
pragma[no_dynamic_join_order]
predicate isUnreachableInCallCached(NodeRegion nr, DataFlowCall call) {
isUnreachableInCall(nr, call)
}
@@ -1348,6 +1350,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
* If a read step was taken, then `read` captures the `Content`, the
* container type, and the content type.
*/
pragma[no_dynamic_join_order]
predicate parameterValueFlow(ParamNode p, Node node, ReadStepTypesOption read, string model) {
parameterValueFlow0(p, node, read, model) and
if node instanceof CastingNode
@@ -1749,7 +1752,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
bindingset[t1, t2]
pragma[inline_late]
predicate compatibleTypesFilter(DataFlowType t1, DataFlowType t2) {
compatibleTypesCached(t1, t2)
compatibleTypesCached(pragma[only_bind_out](t1), pragma[only_bind_into](t2))
}
bindingset[t1, t2]
@@ -2017,6 +2020,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
* the current data flow stage has reached the call of `arg` from one of its
* call targets.
*/
pragma[no_dynamic_join_order]
private predicate typeFlowArgTypeFromReturn(ArgNode arg, DataFlowType t) {
exists(ParamNode p, DataFlowType t1, DataFlowType t2 |
dataFlowTakenCallEdgeOut(_, _, arg, p) and

View File

@@ -776,6 +776,7 @@ module TypeTracking<TypeTrackingInput I> {
predicate isSink() { this instanceof TPathNodeSink }
}
pragma[no_dynamic_join_order]
private predicate edgeCand(Node n1, TypeTracker tt1, Node n2, TypeTracker tt2) {
n1 = flow(tt1) and
(