Skip to content

Commit 18da5f6

Browse files
committed
Ruby: Remove deprecated references to deprecated shared code
1 parent 14dd72b commit 18da5f6

2 files changed

Lines changed: 0 additions & 85 deletions

File tree

ruby/ql/lib/codeql/ruby/dataflow/SSA.qll

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -78,34 +78,6 @@ module Ssa {
7878
*/
7979
final VariableReadAccessCfgNode getAFirstRead() { SsaImpl::firstRead(this, result) }
8080

81-
/**
82-
* Gets a last control-flow node that reads the value of this SSA definition.
83-
* That is, a read that can reach the end of the enclosing CFG scope, or another
84-
* SSA definition for the source variable, without passing through any other read.
85-
*
86-
* Example:
87-
*
88-
* ```rb
89-
* def m b # defines b_0
90-
* i = 0 # defines i_0
91-
* puts i
92-
* puts i + 1 # last read of i_0
93-
* if b # last read of b_0
94-
* i = 1 # defines i_1
95-
* puts i
96-
* puts i + 1 # last read of i_1
97-
* else
98-
* i = 2 # defines i_2
99-
* puts i
100-
* puts i + 1 # last read of i_2
101-
* end
102-
* # defines i_3 = phi(i_1, i_2)
103-
* puts i # last read of i3
104-
* end
105-
* ```
106-
*/
107-
deprecated final VariableReadAccessCfgNode getALastRead() { SsaImpl::lastRead(this, result) }
108-
10981
/**
11082
* Holds if `read1` and `read2` are adjacent reads of this SSA definition.
11183
* That is, `read2` can be reached from `read1` without passing through

ruby/ql/lib/codeql/ruby/dataflow/internal/SsaImpl.qll

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -212,63 +212,6 @@ private predicate hasVariableReadWithCapturedWrite(
212212
variableReadActualInOuterScope(bb, i, v, scope)
213213
}
214214

215-
pragma[noinline]
216-
deprecated private predicate adjacentDefReadExt(
217-
Definition def, BasicBlock bb1, int i1, BasicBlock bb2, int i2, SsaInput::SourceVariable v
218-
) {
219-
Impl::adjacentDefReadExt(def, _, bb1, i1, bb2, i2) and
220-
v = def.getSourceVariable()
221-
}
222-
223-
deprecated private predicate adjacentDefReachesReadExt(
224-
Definition def, BasicBlock bb1, int i1, BasicBlock bb2, int i2
225-
) {
226-
exists(SsaInput::SourceVariable v | adjacentDefReadExt(def, bb1, i1, bb2, i2, v) |
227-
def.definesAt(v, bb1, i1)
228-
or
229-
SsaInput::variableRead(bb1, i1, v, true)
230-
)
231-
or
232-
exists(BasicBlock bb3, int i3 |
233-
adjacentDefReachesReadExt(def, bb1, i1, bb3, i3) and
234-
SsaInput::variableRead(bb3, i3, _, false) and
235-
Impl::adjacentDefReadExt(def, _, bb3, i3, bb2, i2)
236-
)
237-
}
238-
239-
deprecated private predicate adjacentDefReachesUncertainReadExt(
240-
Definition def, BasicBlock bb1, int i1, BasicBlock bb2, int i2
241-
) {
242-
adjacentDefReachesReadExt(def, bb1, i1, bb2, i2) and
243-
SsaInput::variableRead(bb2, i2, _, false)
244-
}
245-
246-
/** Same as `lastRefRedef`, but skips uncertain reads. */
247-
pragma[nomagic]
248-
deprecated private predicate lastRefSkipUncertainReadsExt(Definition def, BasicBlock bb, int i) {
249-
Impl::lastRef(def, bb, i) and
250-
not SsaInput::variableRead(bb, i, def.getSourceVariable(), false)
251-
or
252-
exists(BasicBlock bb0, int i0 |
253-
Impl::lastRef(def, bb0, i0) and
254-
adjacentDefReachesUncertainReadExt(def, bb, i, bb0, i0)
255-
)
256-
}
257-
258-
/**
259-
* Holds if the read of `def` at `read` may be a last read. That is, `read`
260-
* can either reach another definition of the underlying source variable or
261-
* the end of the CFG scope, without passing through another non-pseudo read.
262-
*/
263-
pragma[nomagic]
264-
deprecated predicate lastRead(Definition def, VariableReadAccessCfgNode read) {
265-
exists(Cfg::BasicBlock bb, int i |
266-
lastRefSkipUncertainReadsExt(def, bb, i) and
267-
variableReadActual(bb, i, _) and
268-
read = bb.getNode(i)
269-
)
270-
}
271-
272215
cached
273216
private module Cached {
274217
/**

0 commit comments

Comments
 (0)