@@ -113,7 +113,7 @@ module LocalFlow {
113113 SsaImpl:: lastRefBeforeRedefExt ( def , bb , i , next .getDefinitionExt ( ) ) and
114114 exprFrom = bb .getNode ( i ) and
115115 exprFrom .getExpr ( ) instanceof VariableReadAccess and
116- exprFrom = [ nodeFrom .asExpr ( ) , nodeFrom .( PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( ) ]
116+ exprFrom = [ nodeFrom .asExpr ( ) , nodeFrom .( PostUpdateNodeImpl ) .getPreUpdateNode ( ) .asExpr ( ) ]
117117 )
118118 }
119119
@@ -159,7 +159,7 @@ module LocalFlow {
159159 firstReadExt ( def , nodeTo .asExpr ( ) )
160160 or
161161 // Flow from post-update read to next read
162- localSsaFlowStepUseUse ( def , nodeFrom .( PostUpdateNode ) .getPreUpdateNode ( ) , nodeTo )
162+ localSsaFlowStepUseUse ( def , nodeFrom .( PostUpdateNodeImpl ) .getPreUpdateNode ( ) , nodeTo )
163163 or
164164 // Flow into phi (read) SSA definition node from def
165165 localFlowSsaInputFromDef ( nodeFrom , def , nodeTo )
@@ -454,7 +454,7 @@ private predicate splatArgumentAt(CfgNodes::ExprNodes::CallCfgNode c, int pos) {
454454/** A collection of cached types and predicates to be evaluated in the same stage. */
455455cached
456456private module Cached {
457- private import codeql.ruby.typetracking.TypeTrackerSpecific as TypeTrackerSpecific
457+ private import codeql.ruby.typetracking.internal.TypeTrackingImpl
458458
459459 cached
460460 newtype TNode =
@@ -573,14 +573,10 @@ private module Cached {
573573 VariableCapture:: flowInsensitiveStep ( nodeFrom , nodeTo )
574574 }
575575
576+ /** Holds if `n` wraps an SSA definition without ingoing flow. */
576577 private predicate entrySsaDefinition ( SsaDefinitionExtNode n ) {
577- n = LocalFlow:: getParameterDefNode ( _)
578- or
579- exists ( SsaImpl:: DefinitionExt def | def = n .getDefinitionExt ( ) |
580- def instanceof Ssa:: SelfDefinition
581- or
582- def instanceof Ssa:: CapturedEntryDefinition
583- )
578+ n .getDefinitionExt ( ) =
579+ any ( SsaImpl:: WriteDefinition def | not def .( Ssa:: WriteDefinition ) .assigns ( _) )
584580 }
585581
586582 pragma [ nomagic]
@@ -597,6 +593,16 @@ private module Cached {
597593 )
598594 }
599595
596+ private predicate isStoreTargetNode ( Node n ) {
597+ TypeTrackingInput:: storeStep ( _, n , _)
598+ or
599+ TypeTrackingInput:: loadStoreStep ( _, n , _, _)
600+ or
601+ TypeTrackingInput:: withContentStepImpl ( _, n , _)
602+ or
603+ TypeTrackingInput:: withoutContentStepImpl ( _, n , _)
604+ }
605+
600606 cached
601607 predicate isLocalSourceNode ( Node n ) {
602608 n instanceof TSourceParameterNode
@@ -612,11 +618,9 @@ private module Cached {
612618 entrySsaDefinition ( n ) and
613619 not LocalFlow:: localFlowSsaParamInput ( _, n )
614620 or
615- TypeTrackerSpecific:: basicStoreStep ( _, n , _)
616- or
617- TypeTrackerSpecific:: basicLoadStep ( _, n , _)
621+ isStoreTargetNode ( n )
618622 or
619- TypeTrackerSpecific :: basicLoadStoreStep ( _, n , _ , _)
623+ TypeTrackingInput :: loadStep ( _, n , _)
620624 }
621625
622626 cached
@@ -631,7 +635,7 @@ private module Cached {
631635 TElementContentOfTypeContent ( string type , Boolean includeUnknown ) {
632636 type = any ( Content:: KnownElementContent content ) .getIndex ( ) .getValueType ( )
633637 } or
634- TNoContentSet ( ) // Only used by type-tracking
638+ deprecated TNoContentSet ( ) // Only used by type-tracking
635639
636640 cached
637641 class TContentSet =
0 commit comments