@@ -82,13 +82,6 @@ private module TrackedVariablesImpl {
8282
8383private import TrackedVariablesImpl
8484
85- private predicate untrackedFieldWrite ( BasicBlock bb , int i , SsaSourceVariable v ) {
86- v =
87- any ( SsaSourceField nf |
88- bb .getNode ( i + 1 ) = nf .getAnAccess ( ) .( FieldRead ) .getControlFlowNode ( ) and not trackField ( nf )
89- )
90- }
91-
9285/** Gets the definition point of a nested class in the parent scope. */
9386private ControlFlowNode parentDef ( NestedClass nc ) {
9487 nc .( AnonymousClass ) .getClassInstanceExpr ( ) .getControlFlowNode ( ) = result or
@@ -184,9 +177,6 @@ private module SsaInput implements SsaImplCommon::InputSig<Location, BasicBlock>
184177 certainVariableUpdate ( v , _, bb , i ) and
185178 certain = true
186179 or
187- untrackedFieldWrite ( bb , i , v ) and
188- certain = true
189- or
190180 hasEntryDef ( v , bb ) and
191181 i = - 1 and
192182 certain = true
@@ -204,7 +194,10 @@ private module SsaInput implements SsaImplCommon::InputSig<Location, BasicBlock>
204194 hasDominanceInformation ( bb ) and
205195 (
206196 exists ( VarRead use |
207- v .getAnAccess ( ) = use and bb .getNode ( i ) = use .getControlFlowNode ( ) and certain = true
197+ v instanceof TrackedVar and
198+ v .getAnAccess ( ) = use and
199+ bb .getNode ( i ) = use .getControlFlowNode ( ) and
200+ certain = true
208201 )
209202 or
210203 variableCapture ( v , _, bb , i ) and
@@ -223,16 +216,6 @@ final class UncertainWriteDefinition = Impl::UncertainWriteDefinition;
223216
224217final class PhiNode = Impl:: PhiNode ;
225218
226- class UntrackedDef extends Definition {
227- private VarRead read ;
228-
229- UntrackedDef ( ) { ssaUntrackedDef ( this , read ) }
230-
231- string toString ( ) { result = read .toString ( ) }
232-
233- Location getLocation ( ) { result = read .getLocation ( ) }
234- }
235-
236219cached
237220private module Cached {
238221 /** Gets the destination variable of an update of a tracked variable. */
@@ -256,15 +239,6 @@ private module Cached {
256239 )
257240 }
258241
259- cached
260- predicate ssaUntrackedDef ( Definition def , VarRead read ) {
261- exists ( SsaSourceVariable v , BasicBlock bb , int i |
262- def .definesAt ( v , bb , i ) and
263- untrackedFieldWrite ( bb , i , v ) and
264- read .getControlFlowNode ( ) = bb .getNode ( i + 1 )
265- )
266- }
267-
268242 /*
269243 * The SSA construction for a field `f` relies on implicit update nodes at
270244 * every call site that conceivably could reach an update of the field.
0 commit comments