@@ -1413,22 +1413,21 @@ module MakeImpl<InputSig Lang> {
1413
1413
)
1414
1414
}
1415
1415
1416
- pragma [ nomagic ]
1417
- private predicate flowIntoCallApaCallContextReduced (
1418
- DataFlowCall call , DataFlowCallable c , ArgNodeEx arg , ParamNodeEx p ,
1419
- boolean allowsFieldFlow , ApApprox apa , CcCall outercc
1416
+ bindingset [ call , ctx ]
1417
+ pragma [ inline_late ]
1418
+ private DataFlowCallable viableImplCallContextReducedInlineLate (
1419
+ DataFlowCall call , CcCall ctx
1420
1420
) {
1421
- c = viableImplCallContextReduced ( call , outercc ) and
1422
- flowIntoCallApa ( call , c , arg , p , allowsFieldFlow , apa )
1421
+ result = viableImplCallContextReduced ( call , ctx )
1423
1422
}
1424
1423
1425
- bindingset [ arg, outercc ]
1424
+ bindingset [ arg, ctx ]
1426
1425
pragma [ inline_late]
1427
- private predicate viableImplArgNotCallContextReduced (
1428
- DataFlowCall call , ArgNodeEx arg , Cc outercc
1426
+ private DataFlowCallable viableImplCallContextReducedInlineLate (
1427
+ DataFlowCall call , ArgNodeEx arg , CcCall ctx
1429
1428
) {
1430
1429
call = arg .getCall ( ) and
1431
- viableImplNotCallContextReduced ( call , outercc )
1430
+ result = viableImplCallContextReducedInlineLate ( call , ctx )
1432
1431
}
1433
1432
1434
1433
bindingset [ call]
@@ -1440,6 +1439,21 @@ module MakeImpl<InputSig Lang> {
1440
1439
flowIntoCallApa ( call , c , arg , p , allowsFieldFlow , apa )
1441
1440
}
1442
1441
1442
+ bindingset [ call, ctx]
1443
+ pragma [ inline_late]
1444
+ private predicate viableImplNotCallContextReducedInlineLate ( DataFlowCall call , Cc ctx ) {
1445
+ viableImplNotCallContextReduced ( call , ctx )
1446
+ }
1447
+
1448
+ bindingset [ arg, outercc]
1449
+ pragma [ inline_late]
1450
+ private predicate viableImplArgNotCallContextReduced (
1451
+ DataFlowCall call , ArgNodeEx arg , Cc outercc
1452
+ ) {
1453
+ call = arg .getCall ( ) and
1454
+ viableImplNotCallContextReducedInlineLate ( call , outercc )
1455
+ }
1456
+
1443
1457
pragma [ nomagic]
1444
1458
private predicate fwdFlowIn (
1445
1459
DataFlowCall call , ParamNodeEx p , FlowState state , Cc outercc , CcCall innercc ,
@@ -1448,27 +1462,35 @@ module MakeImpl<InputSig Lang> {
1448
1462
exists ( ArgNodeEx arg , boolean allowsFieldFlow , DataFlowCallable inner |
1449
1463
fwdFlow ( arg , state , outercc , summaryCtx , argT , argAp , t , ap , apa ) and
1450
1464
(
1451
- flowIntoCallApaCallContextReduced ( call , inner , arg , p , allowsFieldFlow , apa , outercc )
1465
+ inner = viableImplCallContextReducedInlineLate ( call , arg , outercc )
1452
1466
or
1453
- viableImplArgNotCallContextReduced ( call , arg , outercc ) and
1454
- flowIntoCallApaInlineLate ( call , inner , arg , p , allowsFieldFlow , apa )
1455
- )
1467
+ viableImplArgNotCallContextReduced ( call , arg , outercc )
1468
+ ) and
1469
+ flowIntoCallApaInlineLate ( call , inner , arg , p , allowsFieldFlow , apa )
1456
1470
|
1457
1471
innercc = getCallContextCall ( call , inner ) and
1458
1472
if allowsFieldFlow = false then ap instanceof ApNil else any ( )
1459
1473
)
1460
1474
}
1461
1475
1462
- pragma [ nomagic]
1463
- private predicate flowOutOfCallApaCallContextReduced (
1476
+ bindingset [ ctx, result ]
1477
+ pragma [ inline_late]
1478
+ private DataFlowCallable viableImplCallContextReducedReverseInlineLate (
1479
+ DataFlowCall call , CcNoCall ctx
1480
+ ) {
1481
+ result = viableImplCallContextReducedReverse ( call , ctx )
1482
+ }
1483
+
1484
+ bindingset [ call]
1485
+ pragma [ inline_late]
1486
+ private predicate flowOutOfCallApaInlineLate (
1464
1487
DataFlowCall call , DataFlowCallable c , RetNodeEx ret , NodeEx out , boolean allowsFieldFlow ,
1465
- ApApprox apa , CcNoCall innercc
1488
+ ApApprox apa
1466
1489
) {
1467
- flowOutOfCallApa ( call , c , ret , _, out , allowsFieldFlow , apa ) and
1468
- c = viableImplCallContextReducedReverse ( call , innercc )
1490
+ flowOutOfCallApa ( call , c , ret , _, out , allowsFieldFlow , apa )
1469
1491
}
1470
1492
1471
- bindingset [ ret, apa, innercc]
1493
+ bindingset [ c , ret, apa, innercc]
1472
1494
pragma [ inline_late]
1473
1495
pragma [ noopt]
1474
1496
private predicate flowOutOfCallApaNotCallContextReduced (
@@ -1490,9 +1512,10 @@ module MakeImpl<InputSig Lang> {
1490
1512
DataFlowCallable inner
1491
1513
|
1492
1514
fwdFlow ( ret , state , innercc , summaryCtx , argT , argAp , t , ap , apa ) and
1515
+ inner = ret .getEnclosingCallable ( ) and
1493
1516
(
1494
- flowOutOfCallApaCallContextReduced ( call , inner , ret , out , allowsFieldFlow , apa ,
1495
- innercc )
1517
+ inner = viableImplCallContextReducedReverseInlineLate ( call , innercc ) and
1518
+ flowOutOfCallApaInlineLate ( call , inner , ret , out , allowsFieldFlow , apa )
1496
1519
or
1497
1520
flowOutOfCallApaNotCallContextReduced ( call , inner , ret , out , allowsFieldFlow , apa ,
1498
1521
innercc )
0 commit comments