Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14dd72b

Browse files
committed
C#: Remove deprecated references to deprecated shared code
1 parent 90ae086 commit 14dd72b

2 files changed

Lines changed: 0 additions & 118 deletions

File tree

csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -311,69 +311,6 @@ module Ssa {
311311
result.getControlFlowNode() = cfn
312312
}
313313

314-
/**
315-
* Gets a last read of the source variable underlying this SSA definition.
316-
* That is, a read that can reach the end of the enclosing callable, or
317-
* another SSA definition for the source variable, without passing through
318-
* any other read. Example:
319-
*
320-
* ```csharp
321-
* int Field;
322-
*
323-
* void SetField(int i) {
324-
* this.Field = i;
325-
* Use(this.Field);
326-
* if (i > 0)
327-
* this.Field = i - 1;
328-
* else if (i < 0)
329-
* SetField(1);
330-
* Use(this.Field);
331-
* Use(this.Field);
332-
* }
333-
* ```
334-
*
335-
* - The reads of `i` on lines 7 and 8 are the last reads for the implicit
336-
* parameter definition on line 3.
337-
* - The read of `this.Field` on line 5 is a last read of the definition on
338-
* line 4.
339-
* - The read of `this.Field` on line 11 is a last read of the phi node
340-
* between lines 9 and 10.
341-
*/
342-
deprecated final AssignableRead getALastRead() { result = this.getALastReadAtNode(_) }
343-
344-
/**
345-
* Gets a last read of the source variable underlying this SSA definition at
346-
* control flow node `cfn`. That is, a read that can reach the end of the
347-
* enclosing callable, or another SSA definition for the source variable,
348-
* without passing through any other read. Example:
349-
*
350-
* ```csharp
351-
* int Field;
352-
*
353-
* void SetField(int i) {
354-
* this.Field = i;
355-
* Use(this.Field);
356-
* if (i > 0)
357-
* this.Field = i - 1;
358-
* else if (i < 0)
359-
* SetField(1);
360-
* Use(this.Field);
361-
* Use(this.Field);
362-
* }
363-
* ```
364-
*
365-
* - The reads of `i` on lines 7 and 8 are the last reads for the implicit
366-
* parameter definition on line 3.
367-
* - The read of `this.Field` on line 5 is a last read of the definition on
368-
* line 4.
369-
* - The read of `this.Field` on line 11 is a last read of the phi node
370-
* between lines 9 and 10.
371-
*/
372-
deprecated final AssignableRead getALastReadAtNode(ControlFlowNode cfn) {
373-
SsaImpl::lastReadSameVar(this, cfn) and
374-
result.getControlFlowNode() = cfn
375-
}
376-
377314
/**
378315
* Gets an SSA definition whose value can flow to this one in one step. This
379316
* includes inputs to phi nodes and the prior definitions of uncertain writes.

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

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -713,61 +713,6 @@ private predicate variableReadPseudo(BasicBlock bb, int i, Ssa::SourceVariable v
713713
refReadBeforeWrite(bb, i, v)
714714
}
715715

716-
pragma[noinline]
717-
deprecated private predicate adjacentDefRead(
718-
Definition def, BasicBlock bb1, int i1, BasicBlock bb2, int i2, SsaInput::SourceVariable v
719-
) {
720-
Impl::adjacentDefRead(def, bb1, i1, bb2, i2) and
721-
v = def.getSourceVariable()
722-
}
723-
724-
deprecated private predicate adjacentDefReachesRead(
725-
Definition def, SsaInput::SourceVariable v, BasicBlock bb1, int i1, BasicBlock bb2, int i2
726-
) {
727-
adjacentDefRead(def, bb1, i1, bb2, i2, v) and
728-
(
729-
def.definesAt(v, bb1, i1)
730-
or
731-
SsaInput::variableRead(bb1, i1, v, true)
732-
)
733-
or
734-
exists(BasicBlock bb3, int i3 |
735-
adjacentDefReachesRead(def, v, bb1, i1, bb3, i3) and
736-
SsaInput::variableRead(bb3, i3, _, false) and
737-
Impl::adjacentDefRead(def, bb3, i3, bb2, i2)
738-
)
739-
}
740-
741-
deprecated private predicate adjacentDefReachesUncertainRead(
742-
Definition def, BasicBlock bb1, int i1, BasicBlock bb2, int i2
743-
) {
744-
exists(SsaInput::SourceVariable v |
745-
adjacentDefReachesRead(def, v, bb1, i1, bb2, i2) and
746-
SsaInput::variableRead(bb2, i2, v, false)
747-
)
748-
}
749-
750-
/** Same as `lastRefRedef`, but skips uncertain reads. */
751-
pragma[nomagic]
752-
deprecated private predicate lastRefSkipUncertainReads(Definition def, BasicBlock bb, int i) {
753-
Impl::lastRef(def, bb, i) and
754-
not SsaInput::variableRead(bb, i, def.getSourceVariable(), false)
755-
or
756-
exists(BasicBlock bb0, int i0 |
757-
Impl::lastRef(def, bb0, i0) and
758-
adjacentDefReachesUncertainRead(def, bb, i, bb0, i0)
759-
)
760-
}
761-
762-
pragma[nomagic]
763-
deprecated predicate lastReadSameVar(Definition def, ControlFlowNode cfn) {
764-
exists(BasicBlock bb, int i |
765-
lastRefSkipUncertainReads(def, bb, i) and
766-
variableReadActual(bb, i, _) and
767-
cfn = bb.getNode(i)
768-
)
769-
}
770-
771716
cached
772717
private module Cached {
773718
cached

0 commit comments

Comments
 (0)