@@ -155,11 +155,12 @@ predicate returnStep(Node nodeFrom, Node nodeTo) {
155
155
predicate basicStoreStep ( Node nodeFrom , Node nodeTo , TypeTrackerContentSet contents ) {
156
156
postUpdateStoreStep ( nodeFrom , nodeTo , contents )
157
157
or
158
- exists ( DataFlowPublic:: CallNode call , SummaryComponent input , SummaryComponent output |
159
- summarizableCall ( call .asExpr ( ) .getExpr ( ) , //
160
- SummaryComponentStack:: singleton ( input ) ,
161
- SummaryComponentStack:: push ( SummaryComponent:: content ( contents ) ,
162
- SummaryComponentStack:: singleton ( output ) ) ) and
158
+ exists (
159
+ SummarizedCallable callable , DataFlowPublic:: CallNode call , SummaryComponent input ,
160
+ SummaryComponent output
161
+ |
162
+ hasStoreSummary ( callable , contents , input , output ) and
163
+ call .asExpr ( ) .getExpr ( ) = callable .getACallSimple ( ) and
163
164
nodeFrom = evaluateSummaryComponentLocal ( call , input ) and
164
165
nodeTo = evaluateSummaryComponentLocal ( call , output )
165
166
)
@@ -194,11 +195,12 @@ predicate basicLoadStep(Node nodeFrom, Node nodeTo, TypeTrackerContentSet conten
194
195
nodeTo .asExpr ( ) = call
195
196
)
196
197
or
197
- exists ( DataFlowPublic:: CallNode call , SummaryComponent input , SummaryComponent output |
198
- summarizableCall ( call .asExpr ( ) .getExpr ( ) , //
199
- SummaryComponentStack:: push ( SummaryComponent:: content ( contents ) ,
200
- SummaryComponentStack:: singleton ( input ) ) , //
201
- SummaryComponentStack:: singleton ( output ) ) and
198
+ exists (
199
+ SummarizedCallable callable , DataFlowPublic:: CallNode call , SummaryComponent input ,
200
+ SummaryComponent output
201
+ |
202
+ hasLoadSummary ( callable , contents , input , output ) and
203
+ call .asExpr ( ) .getExpr ( ) = callable .getACallSimple ( ) and
202
204
nodeFrom = evaluateSummaryComponentLocal ( call , input ) and
203
205
nodeTo = evaluateSummaryComponentLocal ( call , output )
204
206
)
@@ -211,14 +213,24 @@ class Boolean extends boolean {
211
213
Boolean ( ) { this = true or this = false }
212
214
}
213
215
214
- /** Holds if `call` has a summary consisting of the given `input`/`output` pair. */
215
- private predicate summarizableCall (
216
- MethodCall call , SummaryComponentStack input , SummaryComponentStack output
216
+ private import SummaryComponentStack
217
+
218
+ private predicate hasStoreSummary (
219
+ SummarizedCallable callable , TypeTrackerContentSet contents , SummaryComponent input ,
220
+ SummaryComponent output
217
221
) {
218
- exists ( SummarizedCallable callable |
219
- call = callable .getACallSimple ( ) and
220
- callable .propagatesFlow ( input , output , true )
221
- )
222
+ callable
223
+ .propagatesFlow ( singleton ( input ) ,
224
+ push ( SummaryComponent:: content ( contents ) , singleton ( output ) ) , true )
225
+ }
226
+
227
+ private predicate hasLoadSummary (
228
+ SummarizedCallable callable , TypeTrackerContentSet contents , SummaryComponent input ,
229
+ SummaryComponent output
230
+ ) {
231
+ callable
232
+ .propagatesFlow ( push ( SummaryComponent:: content ( contents ) , singleton ( input ) ) ,
233
+ singleton ( output ) , true )
222
234
}
223
235
224
236
/**
0 commit comments