PS: Delete more stuff that's being deprecated and replace with non-deprecated versions.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-04-23 15:58:04 +01:00
parent 06fd1c6513
commit 0a1f89b8eb
2 changed files with 3 additions and 39 deletions

View File

@@ -47,15 +47,6 @@ private class ExprNodeImpl extends ExprNode, NodeImpl {
override string toStringImpl() { result = this.getExprNode().toString() }
}
/** Gets the SSA definition node corresponding to parameter `p`. */
pragma[nomagic]
SsaImpl::DefinitionExt getParameterDef(Parameter p) {
exists(EntryBasicBlock bb, int i |
bb.getNode(i).getAstNode() = p and
result.definesAt(_, bb, i, _)
)
}
/** Provides logic related to SSA. */
module SsaFlow {
private module Impl = SsaImpl::DataFlowIntegration;
@@ -453,7 +444,7 @@ class SsaDefinitionNodeImpl extends SsaNode {
exists(SsaImpl::Definition def | def = this.getDefinition() |
not def instanceof Ssa::WriteDefinition
or
def = getParameterDef(_)
def = SsaImpl::getParameterDef(_)
)
}
}

View File

@@ -179,39 +179,12 @@ private module Cached {
import Cached
/**
* An extended static single assignment (SSA) definition.
*
* This is either a normal SSA definition (`Definition`) or a
* phi-read node (`PhiReadNode`).
*
* Only intended for internal use.
*/
class DefinitionExt extends Impl::DefinitionExt {
VarReadAccessCfgNode getARead() { result = getARead(this) }
override string toString() { result = this.(Ssa::Definition).toString() }
override Location getLocation() { result = this.(Ssa::Definition).getLocation() }
}
/**
* A phi-read node.
*
* Only intended for internal use.
*/
class PhiReadNode extends DefinitionExt, Impl::PhiReadNode {
override string toString() { result = "SSA phi read(" + this.getSourceVariable() + ")" }
override Location getLocation() { result = Impl::PhiReadNode.super.getLocation() }
}
/** Gets the SSA definition node corresponding to parameter `p`. */
pragma[nomagic]
DefinitionExt getParameterDef(Parameter p) {
Definition getParameterDef(Parameter p) {
exists(Cfg::BasicBlock bb, int i |
bb.getNode(i).getAstNode() = p and
result.definesAt(_, bb, i, _)
result.definesAt(_, bb, i)
)
}