@@ -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
@@ -2899,15 +2885,9 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
28992885
29002886 predicate isHidden ( ) {
29012887 not Config:: includeHiddenNodes ( ) and
2902- (
2903- hiddenNode ( this .getNodeEx ( ) .asNode ( ) ) and
2904- not this .isSource ( ) and
2905- not this instanceof PathNodeSink
2906- or
2907- this .getNodeEx ( ) instanceof TNodeImplicitRead
2908- or
2909- hiddenNode ( this .getNodeEx ( ) .asParamReturnNode ( ) )
2910- )
2888+ hiddenNode ( this .getNodeEx ( ) ) and
2889+ not this .isSource ( ) and
2890+ not this instanceof PathNodeSink
29112891 }
29122892
29132893 /** Gets a textual representation of this element. */
@@ -3770,11 +3750,6 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
37703750
37713751 private module Stage2 = MkStage< Stage1 > :: Stage< Stage2Param > ;
37723752
3773- pragma [ nomagic]
3774- private predicate castingNodeEx ( NodeEx node ) {
3775- node .asNode ( ) instanceof CastingNode or exists ( node .asParamReturnNode ( ) )
3776- }
3777-
37783753 private module Stage3Param implements MkStage< Stage2 > :: StageParam {
37793754 private module PrevStage = Stage2;
37803755
@@ -3888,7 +3863,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
38883863
38893864 bindingset [ node, t0]
38903865 private predicate strengthenType ( NodeEx node , DataFlowType t0 , DataFlowType t ) {
3891- if castingNodeEx ( node )
3866+ if node instanceof CastingNodeEx
38923867 then
38933868 exists ( DataFlowType nt | nt = node .getDataFlowType ( ) |
38943869 if typeStrongerThanFilter ( nt , t0 )
@@ -3945,7 +3920,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
39453920 pragma [ nomagic]
39463921 private predicate clearSet ( NodeEx node , ContentSet c ) {
39473922 PrevStage:: revFlow ( node ) and
3948- clearsContentCached ( node . asNode ( ) , c )
3923+ clearsContentSet ( node , c )
39493924 }
39503925
39513926 pragma [ nomagic]
@@ -5024,7 +4999,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
50244999 bindingset [ c]
50255000 private predicate clearsContentEx ( NodeEx n , Content c ) {
50265001 exists ( ContentSet cs |
5027- clearsContentCached ( n . asNode ( ) , cs ) and
5002+ clearsContentSet ( n , cs ) and
50285003 pragma [ only_bind_out ] ( c ) = pragma [ only_bind_into ] ( cs ) .getAReadContent ( )
50295004 )
50305005 }
@@ -5442,9 +5417,8 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
54425417 PartialAccessPath ap
54435418 ) {
54445419 exists ( ReturnKindExt kind , DataFlowCall call |
5445- partialPathOutOfCallable1 ( mid , call , kind , state , cc , t , ap )
5446- |
5447- out .asNode ( ) = kind .getAnOutNode ( call )
5420+ partialPathOutOfCallable1 ( mid , call , kind , state , cc , t , ap ) and
5421+ out = kind .getAnOutNodeEx ( call )
54485422 )
54495423 }
54505424
@@ -5529,7 +5503,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
55295503 ) {
55305504 exists ( DataFlowCall call , ReturnKindExt kind |
55315505 partialPathThroughCallable0 ( call , mid , kind , state , cc , t , ap ) and
5532- out . asNode ( ) = kind .getAnOutNode ( call )
5506+ out = kind .getAnOutNodeEx ( call )
55335507 )
55345508 }
55355509
@@ -5745,7 +5719,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
57455719 ) {
57465720 exists ( DataFlowCall call , ArgumentPosition pos |
57475721 revPartialPathThroughCallable0 ( call , mid , pos , state , ap ) and
5748- node .asNode ( ) . ( ArgNode ) . argumentOf ( call , pos )
5722+ node .argumentOf ( call , pos )
57495723 )
57505724 }
57515725
0 commit comments