Skip to content

Commit bedadc9

Browse files
committed
C#: Deprecate some SSA internals.
1 parent 55b83ca commit bedadc9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • csharp/ql/lib/semmle/code/csharp/dataflow/internal

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ module Ssa_ = Impl::MakeSsa<SsaInput>;
7878

7979
class Definition = Impl::Definition;
8080

81-
class WriteDefinition = Impl::WriteDefinition;
81+
deprecated class WriteDefinition = Impl::WriteDefinition;
8282

83-
class UncertainWriteDefinition = Impl::UncertainWriteDefinition;
83+
deprecated class UncertainWriteDefinition = Impl::UncertainWriteDefinition;
8484

85-
class PhiNode = Impl::PhiNode;
85+
deprecated class PhiNode = Impl::PhiNode;
8686

8787
module Consistency = Impl::Consistency;
8888

@@ -868,7 +868,7 @@ private module Cached {
868868
}
869869

870870
cached
871-
predicate isLiveAtEndOfBlock(Definition def, BasicBlock bb) {
871+
deprecated predicate isLiveAtEndOfBlock(Definition def, BasicBlock bb) {
872872
Impl::ssaDefReachesEndOfBlock(bb, def, _)
873873
}
874874

@@ -878,7 +878,7 @@ private module Cached {
878878
}
879879

880880
cached
881-
AssignableRead getAReadAtNode(Definition def, ControlFlowNode cfn) {
881+
deprecated AssignableRead getAReadAtNode(Definition def, ControlFlowNode cfn) {
882882
exists(Ssa::SourceVariable v, BasicBlock bb, int i |
883883
Impl::ssaDefReachesRead(v, def, bb, i) and
884884
variableReadActual(bb, i, v) and
@@ -1012,9 +1012,9 @@ private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInpu
10121012
predicate hasCfgNode(BasicBlock bb, int i) { this = bb.getNode(i) }
10131013
}
10141014

1015-
Expr getARead(Definition def) { exists(getAReadAtNode(def, result)) }
1015+
Expr getARead(Definition def) { def.(SsaDefinition).getARead().getControlFlowNode() = result }
10161016

1017-
predicate ssaDefHasSource(WriteDefinition def) {
1017+
predicate ssaDefHasSource(Impl::WriteDefinition def) {
10181018
// exclude flow directly from RHS to SSA definition, as we instead want to
10191019
// go from RHS to matching assignable definition, and from there to SSA definition
10201020
def instanceof SsaParameterInit
@@ -1024,7 +1024,7 @@ private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInpu
10241024
* Allows for flow into uncertain defintions that are not call definitions,
10251025
* as we, conservatively, consider such definitions to be certain.
10261026
*/
1027-
predicate allowFlowIntoUncertainDef(UncertainWriteDefinition def) {
1027+
predicate allowFlowIntoUncertainDef(Impl::UncertainWriteDefinition def) {
10281028
def instanceof SsaExplicitWrite
10291029
or
10301030
def =

0 commit comments

Comments
 (0)