@@ -92,6 +92,10 @@ private module CachedSteps {
92
92
cached
93
93
predicate calls ( DataFlow:: InvokeNode invk , Function f ) { f = invk .getACallee ( 0 ) }
94
94
95
+ private predicate callsBoundInternal ( DataFlow:: InvokeNode invk , Function f , int boundArgs , boolean contextDependent ) {
96
+ CallGraph:: getABoundFunctionReference ( f .flow ( ) , boundArgs , contextDependent ) .flowsTo ( invk .getCalleeNode ( ) )
97
+ }
98
+
95
99
/**
96
100
* Holds if `invk` may invoke a bound version of `f` with `boundArgs` already bound.
97
101
*
@@ -101,7 +105,7 @@ private module CachedSteps {
101
105
*/
102
106
cached
103
107
predicate callsBound ( DataFlow:: InvokeNode invk , Function f , int boundArgs ) {
104
- CallGraph :: getABoundFunctionReference ( f . flow ( ) , boundArgs , false ) . flowsTo ( invk . getCalleeNode ( ) )
108
+ callsBoundInternal ( invk , f , boundArgs , false )
105
109
}
106
110
107
111
/**
@@ -111,10 +115,10 @@ private module CachedSteps {
111
115
*/
112
116
cached
113
117
predicate exploratoryBoundInvokeStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
114
- exists ( DataFlow:: InvokeNode invk , DataFlow :: FunctionNode f , int i , int boundArgs |
115
- CallGraph :: getABoundFunctionReference ( f , boundArgs , _) . flowsTo ( invk . getCalleeNode ( ) ) and
118
+ exists ( DataFlow:: InvokeNode invk , Function f , int i , int boundArgs |
119
+ callsBoundInternal ( invk , f , boundArgs , _) and
116
120
pred = invk .getArgument ( i ) and
117
- succ = f .getParameter ( i + boundArgs )
121
+ succ = DataFlow :: parameterNode ( f .getParameter ( i + boundArgs ) )
118
122
)
119
123
}
120
124
0 commit comments