@@ -53,49 +53,11 @@ private module Cached {
5353 predicate step ( DataFlow:: SourceNode pred , DataFlow:: SourceNode succ , StepSummary summary ) {
5454 exists ( DataFlow:: Node mid | pred .flowsTo ( mid ) | StepSummary:: smallstep ( mid , succ , summary ) )
5555 }
56- }
57-
58- import Cached:: Public
59-
60- class OptionalPropertyName extends string {
61- OptionalPropertyName ( ) { this instanceof PropertyName or this = "" }
62- }
63-
64- /**
65- * INTERNAL: Use `TypeTracker` or `TypeBackTracker` instead.
66- *
67- * A description of a step on an inter-procedural data flow path.
68- */
69- class StepSummary extends TStepSummary {
70- /** Gets a textual representation of this step summary. */
71- string toString ( ) {
72- this instanceof LevelStep and result = "level"
73- or
74- this instanceof CallStep and result = "call"
75- or
76- this instanceof ReturnStep and result = "return"
77- or
78- exists ( string prop | this = StoreStep ( prop ) | result = "store " + prop )
79- or
80- exists ( string prop | this = LoadStep ( prop ) | result = "load " + prop )
81- or
82- exists ( string prop | this = CopyStep ( prop ) | result = "copy " + prop )
83- or
84- exists ( string fromProp , string toProp | this = LoadStoreStep ( fromProp , toProp ) |
85- result = "load " + fromProp + " and store to " + toProp
86- )
87- }
88- }
89-
90- module StepSummary {
91- /**
92- * INTERNAL: Use `SourceNode.track()` or `SourceNode.backtrack()` instead.
93- */
94- predicate step = Cached:: step / 3 ;
9556
9657 /**
9758 * INTERNAL: Use `TypeBackTracker.smallstep()` instead.
9859 */
60+ cached
9961 predicate smallstep ( DataFlow:: Node pred , DataFlow:: Node succ , StepSummary summary ) {
10062 // Flow through properties of objects
10163 propertyFlowStep ( pred , succ ) and
@@ -194,3 +156,47 @@ module StepSummary {
194156 )
195157 }
196158}
159+
160+ import Cached:: Public
161+
162+ class OptionalPropertyName extends string {
163+ OptionalPropertyName ( ) { this instanceof PropertyName or this = "" }
164+ }
165+
166+ /**
167+ * INTERNAL: Use `TypeTracker` or `TypeBackTracker` instead.
168+ *
169+ * A description of a step on an inter-procedural data flow path.
170+ */
171+ class StepSummary extends TStepSummary {
172+ /** Gets a textual representation of this step summary. */
173+ string toString ( ) {
174+ this instanceof LevelStep and result = "level"
175+ or
176+ this instanceof CallStep and result = "call"
177+ or
178+ this instanceof ReturnStep and result = "return"
179+ or
180+ exists ( string prop | this = StoreStep ( prop ) | result = "store " + prop )
181+ or
182+ exists ( string prop | this = LoadStep ( prop ) | result = "load " + prop )
183+ or
184+ exists ( string prop | this = CopyStep ( prop ) | result = "copy " + prop )
185+ or
186+ exists ( string fromProp , string toProp | this = LoadStoreStep ( fromProp , toProp ) |
187+ result = "load " + fromProp + " and store to " + toProp
188+ )
189+ }
190+ }
191+
192+ module StepSummary {
193+ /**
194+ * INTERNAL: Use `SourceNode.track()` or `SourceNode.backtrack()` instead.
195+ */
196+ predicate step = Cached:: step / 3 ;
197+
198+ /**
199+ * INTERNAL: Use `TypeBackTracker.smallstep()` instead.
200+ */
201+ predicate smallstep = Cached:: smallstep / 3 ;
202+ }
0 commit comments