@@ -343,7 +343,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
343343 bindingset [ n, cc]
344344 pragma [ inline_late]
345345 private predicate isUnreachableInCall1 ( NodeEx n , LocalCallContextSpecificCall cc ) {
346- cc .unreachable ( n . asNode ( ) )
346+ cc .unreachable ( n )
347347 }
348348
349349 /**
@@ -423,7 +423,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
423423
424424 pragma [ nomagic]
425425 private predicate readSetEx ( NodeEx node1 , ContentSet c , NodeEx node2 ) {
426- readSet ( pragma [ only_bind_into ] ( node1 . asNode ( ) ) , c , pragma [ only_bind_into ] ( node2 . asNode ( ) ) ) and
426+ readEx ( node1 , c , node2 ) and
427427 stepFilter ( node1 , node2 )
428428 or
429429 exists ( Node n |
@@ -450,44 +450,33 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
450450 bindingset [ c]
451451 private predicate expectsContentEx ( NodeEx n , Content c ) {
452452 exists ( ContentSet cs |
453- expectsContentCached ( n . asNode ( ) , cs ) and
453+ expectsContentSet ( n , cs ) and
454454 pragma [ only_bind_out ] ( c ) = pragma [ only_bind_into ] ( cs ) .getAReadContent ( )
455455 )
456456 }
457457
458458 pragma [ nomagic]
459- private predicate notExpectsContent ( NodeEx n ) { not expectsContentCached ( n . asNode ( ) , _) }
459+ private predicate notExpectsContent ( NodeEx n ) { not expectsContentSet ( n , _) }
460460
461461 pragma [ nomagic]
462462 private predicate storeExUnrestricted (
463463 NodeEx node1 , Content c , NodeEx node2 , DataFlowType contentType , DataFlowType containerType
464464 ) {
465- store ( pragma [ only_bind_into ] ( node1 .asNode ( ) ) , c , pragma [ only_bind_into ] ( node2 .asNode ( ) ) ,
466- contentType , containerType ) and
465+ storeEx ( node1 , c , node2 , contentType , containerType ) and
467466 stepFilter ( node1 , node2 )
468467 }
469468
470469 pragma [ nomagic]
471470 private predicate hasReadStep ( Content c ) { read ( _, c , _) }
472471
473472 pragma [ nomagic]
474- private predicate storeEx (
473+ private predicate storeExRestricted (
475474 NodeEx node1 , Content c , NodeEx node2 , DataFlowType contentType , DataFlowType containerType
476475 ) {
477476 storeExUnrestricted ( node1 , c , node2 , contentType , containerType ) and
478477 hasReadStep ( c )
479478 }
480479
481- pragma [ nomagic]
482- private predicate viableReturnPosOutEx ( DataFlowCall call , ReturnPosition pos , NodeEx out ) {
483- viableReturnPosOut ( call , pos , out .asNode ( ) )
484- }
485-
486- pragma [ nomagic]
487- private predicate viableParamArgEx ( DataFlowCall call , ParamNodeEx p , ArgNodeEx arg ) {
488- viableParamArg ( call , p .asNode ( ) , arg .asNode ( ) )
489- }
490-
491480 /**
492481 * Holds if field flow should be used for the given configuration.
493482 */
@@ -520,7 +509,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
520509 exists ( ParameterPosition pos | p .isParameterOf ( _, pos ) |
521510 not kind .( ParamUpdateReturnKind ) .getPosition ( ) = pos
522511 or
523- allowParameterReturnInSelfCached ( p . asNode ( ) )
512+ allowParameterReturnInSelfEx ( p )
524513 )
525514 }
526515
@@ -558,7 +547,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
558547 exists ( NodeEx mid |
559548 useFieldFlow ( ) and
560549 fwdFlow ( mid , cc ) and
561- storeEx ( mid , _, node , _, _)
550+ storeExRestricted ( mid , _, node , _, _)
562551 )
563552 or
564553 // read
@@ -653,7 +642,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
653642 not fullBarrier ( node ) and
654643 useFieldFlow ( ) and
655644 fwdFlow ( mid , _) and
656- storeEx ( mid , c , node , _, _)
645+ storeExRestricted ( mid , c , node , _, _)
657646 )
658647 }
659648
@@ -796,7 +785,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
796785 exists ( NodeEx mid |
797786 revFlow ( mid , toReturn ) and
798787 fwdFlowConsCand ( c ) and
799- storeEx ( node , c , mid , _, _)
788+ storeExRestricted ( node , c , mid , _, _)
800789 )
801790 }
802791
@@ -893,7 +882,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
893882 ) {
894883 revFlowIsReadAndStored ( c ) and
895884 revFlow ( node2 ) and
896- storeEx ( node1 , c , node2 , contentType , containerType ) and
885+ storeExRestricted ( node1 , c , node2 , contentType , containerType ) and
897886 exists ( ap1 )
898887 }
899888
@@ -1152,7 +1141,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
11521141 flowOutOfCallNodeCand1 ( call , ret , _, out ) and
11531142 c = ret .getEnclosingCallable ( )
11541143 |
1155- scope = getSecondLevelScopeCached ( ret . asNode ( ) )
1144+ scope = getSecondLevelScopeEx ( ret )
11561145 or
11571146 ret = TParamReturnNode ( _, scope )
11581147 )
@@ -1496,7 +1485,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
14961485 PrevStage:: revFlow ( node , state , apa ) and
14971486 filter ( node , state , t0 , ap , t ) and
14981487 (
1499- if castingNodeEx ( node )
1488+ if node instanceof CastingNodeEx
15001489 then
15011490 ap instanceof ApNil or
15021491 compatibleContainer ( getHeadContent ( ap ) , node .getDataFlowType ( ) ) or
@@ -2627,10 +2616,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26272616 FlowCheckNode ( ) {
26282617 revFlow ( this , _, _) and
26292618 (
2630- castNode ( this .asNode ( ) ) or
2631- clearsContentCached ( this .asNode ( ) , _) or
2632- expectsContentCached ( this .asNode ( ) , _) or
2633- neverSkipInPathGraph ( this .asNode ( ) ) or
2619+ flowCheckNode ( this ) or
26342620 Config:: neverSkip ( this .asNode ( ) )
26352621 )
26362622 }
@@ -2665,7 +2651,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
26652651 or
26662652 node instanceof ParamNodeEx
26672653 or
2668- node . asNode ( ) instanceof OutNodeExt
2654+ node instanceof OutNodeEx
26692655 or
26702656 storeStepCand ( _, _, _, node , _, _)
26712657 or
@@ -2900,13 +2886,11 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
29002886 predicate isHidden ( ) {
29012887 not Config:: includeHiddenNodes ( ) and
29022888 (
2903- hiddenNode ( this .getNodeEx ( ) . asNode ( ) ) and
2889+ hiddenNode ( this .getNodeEx ( ) ) and
29042890 not this .isSource ( ) and
29052891 not this instanceof PathNodeSink
29062892 or
29072893 this .getNodeEx ( ) instanceof TNodeImplicitRead
2908- or
2909- hiddenNode ( this .getNodeEx ( ) .asParamReturnNode ( ) )
29102894 )
29112895 }
29122896
@@ -3770,11 +3754,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
37703754
37713755 private module Stage2 = MkStage< Stage1 > :: Stage< Stage2Param > ;
37723756
3773- pragma [ nomagic]
3774- private predicate castingNodeEx ( NodeEx node ) {
3775- node .asNode ( ) instanceof CastingNode or exists ( node .asParamReturnNode ( ) )
3776- }
3777-
37783757 private module Stage3Param implements MkStage< Stage2 > :: StageParam {
37793758 private module PrevStage = Stage2;
37803759
@@ -3888,7 +3867,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
38883867
38893868 bindingset [ node, t0]
38903869 private predicate strengthenType ( NodeEx node , DataFlowType t0 , DataFlowType t ) {
3891- if castingNodeEx ( node )
3870+ if node instanceof CastingNodeEx
38923871 then
38933872 exists ( DataFlowType nt | nt = node .getDataFlowType ( ) |
38943873 if typeStrongerThanFilter ( nt , t0 )
@@ -3945,7 +3924,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
39453924 pragma [ nomagic]
39463925 private predicate clearSet ( NodeEx node , ContentSet c ) {
39473926 PrevStage:: revFlow ( node ) and
3948- clearsContentCached ( node . asNode ( ) , c )
3927+ clearsContentSet ( node , c )
39493928 }
39503929
39513930 pragma [ nomagic]
@@ -5024,7 +5003,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
50245003 bindingset [ c]
50255004 private predicate clearsContentEx ( NodeEx n , Content c ) {
50265005 exists ( ContentSet cs |
5027- clearsContentCached ( n . asNode ( ) , cs ) and
5006+ clearsContentSet ( n , cs ) and
50285007 pragma [ only_bind_out ] ( c ) = pragma [ only_bind_into ] ( cs ) .getAReadContent ( )
50295008 )
50305009 }
@@ -5442,9 +5421,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
54425421 PartialAccessPath ap
54435422 ) {
54445423 exists ( ReturnKindExt kind , DataFlowCall call |
5445- partialPathOutOfCallable1 ( mid , call , kind , state , cc , t , ap )
5446- |
5447- out .asNode ( ) = kind .getAnOutNode ( call )
5424+ partialPathOutOfCallable1 ( mid , call , kind , state , cc , t , ap ) and
5425+ out = kind .getAnOutNodeEx ( call )
54485426 )
54495427 }
54505428
@@ -5529,7 +5507,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
55295507 ) {
55305508 exists ( DataFlowCall call , ReturnKindExt kind |
55315509 partialPathThroughCallable0 ( call , mid , kind , state , cc , t , ap ) and
5532- out . asNode ( ) = kind .getAnOutNode ( call )
5510+ out = kind .getAnOutNodeEx ( call )
55335511 )
55345512 }
55355513
@@ -5745,7 +5723,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
57455723 ) {
57465724 exists ( DataFlowCall call , ArgumentPosition pos |
57475725 revPartialPathThroughCallable0 ( call , mid , pos , state , ap ) and
5748- node .asNode ( ) . ( ArgNode ) . argumentOf ( call , pos )
5726+ node .argumentOf ( call , pos )
57495727 )
57505728 }
57515729
0 commit comments