Skip to content

Commit 0a1f89b

Browse files
committed
PS: Delete more stuff that's being deprecated and replace with non-deprecated versions.
1 parent 06fd1c6 commit 0a1f89b

File tree

2 files changed

+3
-39
lines changed

2 files changed

+3
-39
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ private class ExprNodeImpl extends ExprNode, NodeImpl {
4747
override string toStringImpl() { result = this.getExprNode().toString() }
4848
}
4949

50-
/** Gets the SSA definition node corresponding to parameter `p`. */
51-
pragma[nomagic]
52-
SsaImpl::DefinitionExt getParameterDef(Parameter p) {
53-
exists(EntryBasicBlock bb, int i |
54-
bb.getNode(i).getAstNode() = p and
55-
result.definesAt(_, bb, i, _)
56-
)
57-
}
58-
5950
/** Provides logic related to SSA. */
6051
module SsaFlow {
6152
private module Impl = SsaImpl::DataFlowIntegration;
@@ -453,7 +444,7 @@ class SsaDefinitionNodeImpl extends SsaNode {
453444
exists(SsaImpl::Definition def | def = this.getDefinition() |
454445
not def instanceof Ssa::WriteDefinition
455446
or
456-
def = getParameterDef(_)
447+
def = SsaImpl::getParameterDef(_)
457448
)
458449
}
459450
}

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

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -179,39 +179,12 @@ private module Cached {
179179

180180
import Cached
181181

182-
/**
183-
* An extended static single assignment (SSA) definition.
184-
*
185-
* This is either a normal SSA definition (`Definition`) or a
186-
* phi-read node (`PhiReadNode`).
187-
*
188-
* Only intended for internal use.
189-
*/
190-
class DefinitionExt extends Impl::DefinitionExt {
191-
VarReadAccessCfgNode getARead() { result = getARead(this) }
192-
193-
override string toString() { result = this.(Ssa::Definition).toString() }
194-
195-
override Location getLocation() { result = this.(Ssa::Definition).getLocation() }
196-
}
197-
198-
/**
199-
* A phi-read node.
200-
*
201-
* Only intended for internal use.
202-
*/
203-
class PhiReadNode extends DefinitionExt, Impl::PhiReadNode {
204-
override string toString() { result = "SSA phi read(" + this.getSourceVariable() + ")" }
205-
206-
override Location getLocation() { result = Impl::PhiReadNode.super.getLocation() }
207-
}
208-
209182
/** Gets the SSA definition node corresponding to parameter `p`. */
210183
pragma[nomagic]
211-
DefinitionExt getParameterDef(Parameter p) {
184+
Definition getParameterDef(Parameter p) {
212185
exists(Cfg::BasicBlock bb, int i |
213186
bb.getNode(i).getAstNode() = p and
214-
result.definesAt(_, bb, i, _)
187+
result.definesAt(_, bb, i)
215188
)
216189
}
217190

0 commit comments

Comments
 (0)