Skip to content

Commit 06fd1c6

Browse files
committed
PS: Delete deprecated unnecessary predicates.
1 parent 5ec59c3 commit 06fd1c6

File tree

3 files changed

+0
-70
lines changed

3 files changed

+0
-70
lines changed

powershell/ql/lib/semmle/code/powershell/controlflow/ControlFlowGraph.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ class CfgNode extends CfgImpl::Node {
4141
/** Gets the file of this control flow node. */
4242
final File getFile() { result = this.getLocation().getFile() }
4343

44-
/** DEPRECATED: Use `getAstNode` instead. */
45-
deprecated Ast getNode() { result = this.getAstNode() }
46-
4744
/** Gets a successor node of a given type, if any. */
4845
final CfgNode getASuccessor(SuccessorType t) { result = super.getASuccessor(t) }
4946

powershell/ql/lib/semmle/code/powershell/dataflow/Ssa.qll

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ module Ssa {
3434
*/
3535
final VarReadAccessCfgNode getAFirstRead() { SsaImpl::firstRead(this, result) }
3636

37-
/**
38-
* Gets a last control-flow node that reads the value of this SSA definition.
39-
* That is, a read that can reach the end of the enclosing CFG scope, or another
40-
* SSA definition for the source variable, without passing through any other read.
41-
*/
42-
deprecated final VarReadAccessCfgNode getALastRead() { SsaImpl::lastRead(this, result) }
43-
4437
/**
4538
* Holds if `read1` and `read2` are adjacent reads of this SSA definition.
4639
* That is, `read2` can be reached from `read1` without passing through

powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -78,66 +78,6 @@ private predicate variableReadActual(Cfg::BasicBlock bb, int i, Variable v) {
7878
)
7979
}
8080

81-
pragma[noinline]
82-
deprecated private predicate adjacentDefReadExt(
83-
DefinitionExt def, SsaInput::BasicBlock bb1, int i1, SsaInput::BasicBlock bb2, int i2,
84-
SsaInput::SourceVariable v
85-
) {
86-
Impl::adjacentDefReadExt(def, _, bb1, i1, bb2, i2) and
87-
v = def.getSourceVariable()
88-
}
89-
90-
deprecated private predicate adjacentDefReachesReadExt(
91-
DefinitionExt def, SsaInput::BasicBlock bb1, int i1, SsaInput::BasicBlock bb2, int i2
92-
) {
93-
exists(SsaInput::SourceVariable v | adjacentDefReadExt(def, bb1, i1, bb2, i2, v) |
94-
def.definesAt(v, bb1, i1, _)
95-
or
96-
SsaInput::variableRead(bb1, i1, v, true)
97-
)
98-
or
99-
exists(SsaInput::BasicBlock bb3, int i3 |
100-
adjacentDefReachesReadExt(def, bb1, i1, bb3, i3) and
101-
SsaInput::variableRead(bb3, i3, _, false) and
102-
Impl::adjacentDefReadExt(def, _, bb3, i3, bb2, i2)
103-
)
104-
}
105-
106-
deprecated private predicate adjacentDefReachesUncertainReadExt(
107-
DefinitionExt def, SsaInput::BasicBlock bb1, int i1, SsaInput::BasicBlock bb2, int i2
108-
) {
109-
adjacentDefReachesReadExt(def, bb1, i1, bb2, i2) and
110-
SsaInput::variableRead(bb2, i2, _, false)
111-
}
112-
113-
/** Same as `lastRefRedef`, but skips uncertain reads. */
114-
pragma[nomagic]
115-
deprecated private predicate lastRefSkipUncertainReadsExt(
116-
DefinitionExt def, SsaInput::BasicBlock bb, int i
117-
) {
118-
Impl::lastRef(def, bb, i) and
119-
not SsaInput::variableRead(bb, i, def.getSourceVariable(), false)
120-
or
121-
exists(SsaInput::BasicBlock bb0, int i0 |
122-
Impl::lastRef(def, bb0, i0) and
123-
adjacentDefReachesUncertainReadExt(def, bb, i, bb0, i0)
124-
)
125-
}
126-
127-
/**
128-
* Holds if the read of `def` at `read` may be a last read. That is, `read`
129-
* can either reach another definition of the underlying source variable or
130-
* the end of the CFG scope, without passing through another non-pseudo read.
131-
*/
132-
pragma[nomagic]
133-
deprecated predicate lastRead(Definition def, VarReadAccessCfgNode read) {
134-
exists(Cfg::BasicBlock bb, int i |
135-
lastRefSkipUncertainReadsExt(def, bb, i) and
136-
variableReadActual(bb, i, _) and
137-
read = bb.getNode(i)
138-
)
139-
}
140-
14181
cached
14282
private module Cached {
14383
/**

0 commit comments

Comments
 (0)