@@ -456,9 +456,9 @@ module VariableCapture {
456456 Flow:: clearsContent ( asClosureNode ( node ) , getCapturedVariableContent ( c ) )
457457 }
458458
459- class CapturedSsaDefinitionExt extends SsaImpl :: DefinitionExt {
460- CapturedSsaDefinitionExt ( ) {
461- this .getSourceVariable ( ) . getAssignable ( ) = any ( CapturedVariable v ) .asLocalScopeVariable ( )
459+ class CapturedSsaSourceVariable extends Ssa :: SourceVariable {
460+ CapturedSsaSourceVariable ( ) {
461+ this .getAssignable ( ) = any ( CapturedVariable v ) .asLocalScopeVariable ( )
462462 }
463463 }
464464
@@ -509,12 +509,12 @@ module SsaFlow {
509509 result .( Impl:: ParameterNode ) .getParameter ( ) = n .( ExplicitParameterNode ) .getSsaDefinition ( )
510510 }
511511
512- predicate localFlowStep ( SsaImpl :: DefinitionExt def , Node nodeFrom , Node nodeTo , boolean isUseStep ) {
513- Impl:: localFlowStep ( def , asNode ( nodeFrom ) , asNode ( nodeTo ) , isUseStep )
512+ predicate localFlowStep ( Ssa :: SourceVariable v , Node nodeFrom , Node nodeTo , boolean isUseStep ) {
513+ Impl:: localFlowStep ( v , asNode ( nodeFrom ) , asNode ( nodeTo ) , isUseStep )
514514 }
515515
516- predicate localMustFlowStep ( SsaImpl :: DefinitionExt def , Node nodeFrom , Node nodeTo ) {
517- Impl:: localMustFlowStep ( def , asNode ( nodeFrom ) , asNode ( nodeTo ) )
516+ predicate localMustFlowStep ( Ssa :: SourceVariable v , Node nodeFrom , Node nodeTo ) {
517+ Impl:: localMustFlowStep ( v , asNode ( nodeFrom ) , asNode ( nodeTo ) )
518518 }
519519}
520520
@@ -644,12 +644,10 @@ module LocalFlow {
644644 }
645645
646646 /**
647- * Holds if the source variable of SSA definition `def ` is an instance field.
647+ * Holds if the source variable `v ` is an instance field.
648648 */
649- predicate usesInstanceField ( SsaImpl:: DefinitionExt def ) {
650- exists ( Ssa:: SourceVariables:: FieldOrPropSourceVariable fp | fp = def .getSourceVariable ( ) |
651- not fp .getAssignable ( ) .( Modifiable ) .isStatic ( )
652- )
649+ predicate isInstanceField ( Ssa:: SourceVariables:: FieldOrPropSourceVariable v ) {
650+ not v .getAssignable ( ) .( Modifiable ) .isStatic ( )
653651 }
654652
655653 predicate localFlowStepCommon ( Node nodeFrom , Node nodeTo ) {
@@ -749,10 +747,10 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo, string model) {
749747 (
750748 LocalFlow:: localFlowStepCommon ( nodeFrom , nodeTo )
751749 or
752- exists ( SsaImpl :: DefinitionExt def , boolean isUseStep |
753- SsaFlow:: localFlowStep ( def , nodeFrom , nodeTo , isUseStep ) and
754- not LocalFlow:: usesInstanceField ( def ) and
755- not def instanceof VariableCapture:: CapturedSsaDefinitionExt
750+ exists ( Ssa :: SourceVariable v , boolean isUseStep |
751+ SsaFlow:: localFlowStep ( v , nodeFrom , nodeTo , isUseStep ) and
752+ not LocalFlow:: isInstanceField ( v ) and
753+ not v instanceof VariableCapture:: CapturedSsaSourceVariable
756754 |
757755 isUseStep = false
758756 or
@@ -3007,13 +3005,13 @@ private predicate delegateCreationStep(Node nodeFrom, Node nodeTo) {
30073005
30083006/** Extra data-flow steps needed for lambda flow analysis. */
30093007predicate additionalLambdaFlowStep ( Node nodeFrom , Node nodeTo , boolean preservesValue ) {
3010- exists ( SsaImpl :: DefinitionExt def |
3011- SsaFlow:: localFlowStep ( def , nodeFrom , nodeTo , _) and
3008+ exists ( Ssa :: SourceVariable v |
3009+ SsaFlow:: localFlowStep ( v , nodeFrom , nodeTo , _) and
30123010 preservesValue = true
30133011 |
3014- LocalFlow:: usesInstanceField ( def )
3012+ LocalFlow:: isInstanceField ( v )
30153013 or
3016- def instanceof VariableCapture:: CapturedSsaDefinitionExt
3014+ v instanceof VariableCapture:: CapturedSsaSourceVariable
30173015 )
30183016 or
30193017 delegateCreationStep ( nodeFrom , nodeTo ) and
0 commit comments