Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions java/ql/lib/semmle/code/java/dataflow/SSA.qll
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ VarRead ssaGetAFirstUse(SsaDefinition def) { firstUse(def, result) }
*
* An SSA variable.
*/
class SsaVariable extends Definition {
deprecated class SsaVariable extends Definition {
/** Gets the SSA source variable underlying this SSA variable. */
SsaSourceVariable getSourceVariable() { result = super.getSourceVariable() }

Expand All @@ -203,7 +203,7 @@ class SsaVariable extends Definition {
* Gets the `ControlFlowNode` at which this SSA variable is defined.
*/
pragma[nomagic]
ControlFlowNode getCfgNode() {
deprecated ControlFlowNode getCfgNode() {
exists(BasicBlock bb, int i |
this.definesAt(_, bb, i) and
// phi nodes are inserted at position `-1`
Expand All @@ -225,7 +225,7 @@ class SsaVariable extends Definition {
*
* Gets an access of this SSA variable.
*/
VarRead getAUse() { result = getAUse(this) }
deprecated VarRead getAUse() { result = getAUse(this) }

/**
* DEPRECATED: Use `ssaGetAFirstUse(SsaDefinition)` instead.
Expand Down Expand Up @@ -272,7 +272,7 @@ class SsaVariable extends Definition {
*
* An SSA variable that either explicitly or implicitly updates the variable.
*/
class SsaUpdate extends SsaVariable instanceof WriteDefinition {
deprecated class SsaUpdate extends SsaVariable instanceof WriteDefinition {
SsaUpdate() { not this instanceof SsaImplicitInit }
}

Expand All @@ -281,7 +281,7 @@ class SsaUpdate extends SsaVariable instanceof WriteDefinition {
*
* An SSA variable that is defined by a `VariableUpdate`.
*/
class SsaExplicitUpdate extends SsaUpdate {
deprecated class SsaExplicitUpdate extends SsaUpdate {
private VariableUpdate upd;

SsaExplicitUpdate() { ssaExplicitUpdate(this, upd) }
Expand Down Expand Up @@ -409,7 +409,7 @@ deprecated class SsaUncertainImplicitUpdate extends SsaImplicitUpdate {
* An SSA variable that is defined by its initial value in the callable. This
* includes initial values of parameters, fields, and closure variables.
*/
class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
deprecated class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
SsaImplicitInit() { ssaImplicitInit(this) }

override string toString() { result = "SSA init(" + this.getSourceVariable() + ")" }
Expand All @@ -422,7 +422,7 @@ class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
*
* Holds if the SSA variable is a parameter defined by its initial value in the callable.
*/
predicate isParameterDefinition(Parameter p) {
deprecated predicate isParameterDefinition(Parameter p) {
this.getSourceVariable() = TLocalVar(p.getCallable(), p) and
p.getCallable().getBody().getControlFlowNode() = this.getCfgNode()
}
Expand Down
8 changes: 4 additions & 4 deletions java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ final class UncertainWriteDefinition = Impl::UncertainWriteDefinition;

final class PhiNode = Impl::PhiNode;

predicate ssaExplicitUpdate(SsaUpdate def, VariableUpdate upd) {
deprecated predicate ssaExplicitUpdate(SsaUpdate def, VariableUpdate upd) {
exists(SsaSourceVariable v, BasicBlock bb, int i |
def.definesAt(v, bb, i) and
certainVariableUpdate(v, upd.getControlFlowNode(), bb, i) and
Expand All @@ -259,7 +259,7 @@ deprecated predicate ssaUncertainImplicitUpdate(SsaImplicitUpdate def) {
)
}

predicate ssaImplicitInit(WriteDefinition def) {
deprecated predicate ssaImplicitInit(WriteDefinition def) {
exists(SsaSourceVariable v, BasicBlock bb, int i |
def.definesAt(v, bb, i) and
hasEntryDef(v, bb) and
Expand All @@ -275,15 +275,15 @@ deprecated predicate ssaDefReachesUncertainDef(TrackedSsaDef def, SsaUncertainIm
Impl::uncertainWriteDefinitionInput(redef, def)
}

VarRead getAUse(Definition def) {
deprecated VarRead getAUse(Definition def) {
exists(SsaSourceVariable v, BasicBlock bb, int i |
Impl::ssaDefReachesRead(v, def, bb, i) and
result.getControlFlowNode() = bb.getNode(i) and
result = v.getAnAccess()
)
}

predicate ssaDefReachesEndOfBlock(BasicBlock bb, Definition def) {
deprecated predicate ssaDefReachesEndOfBlock(BasicBlock bb, Definition def) {
Impl::ssaDefReachesEndOfBlock(bb, def, _)
}

Expand Down
Loading