@@ -1402,32 +1402,13 @@ private predicate flowCandFwd(
1402
1402
else any ( )
1403
1403
}
1404
1404
1405
- /**
1406
- * A node that requires an empty access path and should have its tracked type
1407
- * (re-)computed. This is either a source or a node reached through an
1408
- * additional step.
1409
- */
1410
- private class AccessPathFrontNilNode extends NormalNodeExt {
1411
- AccessPathFrontNilNode ( ) {
1412
- nodeCand ( this , _) and
1413
- (
1414
- any ( Configuration c ) .isSource ( this .getNode ( ) )
1415
- or
1416
- additionalJumpStepExt ( _, this , _)
1417
- )
1418
- }
1419
-
1420
- /** Gets the `nil` path front for this node. */
1421
- AccessPathFrontNil getApf ( ) { result = TFrontNil ( this .getErasedNodeTypeBound ( ) ) }
1422
- }
1423
-
1424
1405
private predicate flowCandFwd0 (
1425
1406
NodeExt node , boolean fromArg , AccessPathFront apf , Configuration config
1426
1407
) {
1427
1408
nodeCand2 ( node , _, false , config ) and
1428
1409
config .isSource ( node .getNode ( ) ) and
1429
1410
fromArg = false and
1430
- apf = node .( AccessPathFrontNilNode ) . getApf ( )
1411
+ apf = TFrontNil ( node .getErasedNodeTypeBound ( ) )
1431
1412
or
1432
1413
nodeCand ( node , unbind ( config ) ) and
1433
1414
(
@@ -1451,7 +1432,7 @@ private predicate flowCandFwd0(
1451
1432
flowCandFwd ( mid , _, nil , config ) and
1452
1433
additionalJumpStepExt ( mid , node , config ) and
1453
1434
fromArg = false and
1454
- apf = node .( AccessPathFrontNilNode ) . getApf ( )
1435
+ apf = TFrontNil ( node .getErasedNodeTypeBound ( ) )
1455
1436
)
1456
1437
or
1457
1438
exists ( NodeExt mid , boolean allowsFieldFlow |
@@ -1814,18 +1795,6 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
1814
1795
/** Gets the access path obtained by pushing `f` onto `ap`. */
1815
1796
private AccessPath push ( Content f , AccessPath ap ) { ap = pop ( f , result ) }
1816
1797
1817
- /**
1818
- * A node that requires an empty access path and should have its tracked type
1819
- * (re-)computed. This is either a source or a node reached through an
1820
- * additional step.
1821
- */
1822
- private class AccessPathNilNode extends NormalNodeExt {
1823
- AccessPathNilNode ( ) { flowCand ( this .( AccessPathFrontNilNode ) , _, _, _) }
1824
-
1825
- /** Gets the `nil` path for this node. */
1826
- AccessPathNil getAp ( ) { result = TNil ( this .getErasedNodeTypeBound ( ) ) }
1827
- }
1828
-
1829
1798
/**
1830
1799
* Holds if data can flow from a source to `node` with the given `ap`.
1831
1800
*/
@@ -1842,7 +1811,7 @@ private predicate flowFwd0(
1842
1811
flowCand ( node , _, _, config ) and
1843
1812
config .isSource ( node .getNode ( ) ) and
1844
1813
fromArg = false and
1845
- ap = node .( AccessPathNilNode ) . getAp ( ) and
1814
+ ap = TNil ( node .getErasedNodeTypeBound ( ) ) and
1846
1815
apf = ap .( AccessPathNil ) .getFront ( )
1847
1816
or
1848
1817
flowCand ( node , _, _, unbind ( config ) ) and
@@ -1868,7 +1837,7 @@ private predicate flowFwd0(
1868
1837
flowFwd ( mid , _, _, nil , config ) and
1869
1838
additionalJumpStepExt ( mid , node , config ) and
1870
1839
fromArg = false and
1871
- ap = node .( AccessPathNilNode ) . getAp ( ) and
1840
+ ap = TNil ( node .getErasedNodeTypeBound ( ) ) and
1872
1841
apf = ap .( AccessPathNil ) .getFront ( )
1873
1842
)
1874
1843
or
@@ -2167,7 +2136,7 @@ private newtype TPathNode =
2167
2136
config .isSource ( node ) and
2168
2137
cc instanceof CallContextAny and
2169
2138
sc instanceof SummaryCtxNone and
2170
- ap = any ( AccessPathNilNode nil | nil . getNode ( ) = node ) . getAp ( )
2139
+ ap = TNil ( getErasedNodeTypeBound ( node ) )
2171
2140
or
2172
2141
// ... or a step from an existing PathNode to another node.
2173
2142
exists ( PathNodeMid mid |
@@ -2376,7 +2345,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
2376
2345
cc instanceof CallContextAny and
2377
2346
sc instanceof SummaryCtxNone and
2378
2347
mid .getAp ( ) instanceof AccessPathNil and
2379
- ap = any ( AccessPathNilNode nil | nil . getNode ( ) = node ) . getAp ( )
2348
+ ap = TNil ( getErasedNodeTypeBound ( node ) )
2380
2349
or
2381
2350
exists ( Content f , AccessPath ap0 | pathReadStep ( mid , node , ap0 , f , cc ) and ap = pop ( f , ap0 ) ) and
2382
2351
sc = mid .getSummaryCtx ( )
0 commit comments