Skip to content

Commit 10efea1

Browse files
committed
Java/Shared: Address review comments.
1 parent 3fde675 commit 10efea1

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: deprecated
33
---
4-
* Java now uses the shared `BasicBlock` library. This means that several member predicates now use the preferred names. The old predicates have been deprecated. The `BasicBlock` class itself no longer extends `ControlFlowNode` - the predicate `getFirstNode` can be used to fix any QL code that somehow relied on this.
4+
* Java now uses the shared `BasicBlock` library. This means that the names of several member predicates have been changed to align with the names used in other languages. The old predicates have been deprecated. The `BasicBlock` class itself no longer extends `ControlFlowNode` - the predicate `getFirstNode` can be used to fix any QL code that somehow relied on this.

java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ predicate hasDominanceInformation(BasicBlock bb) {
7070
}
7171

7272
/**
73-
* A control-flow node that represents the start of a basic block.
74-
*
75-
* A basic block is a series of nodes with no control-flow branching, which can
76-
* often be treated as a unit in analyses.
73+
* A basic block, that is, a maximal straight-line sequence of control flow nodes
74+
* without branches or joins.
7775
*/
7876
class BasicBlock extends BbImpl::BasicBlock {
7977
/** Gets the immediately enclosing callable whose body contains this node. */

shared/controlflow/codeql/controlflow/BasicBlock.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ module Make<LocationSig Location, InputSig<Location> Input> {
246246
* implies that `(bb1, bb2)` dominates its endpoint `bb2`. I.e., `bb2` can
247247
* only be reached from the entry block by going via `(bb1, bb2)`.
248248
*
249-
* This is a necessary and sufficient condition for an edge to dominate anything,
250-
* and in particular `dominatingEdge(bb1, bb2) and bb2.dominates(bb3)` means
251-
* that the edge `(bb1, bb2)` dominates `bb3`.
249+
* This is a necessary and sufficient condition for an edge to dominate some
250+
* block, and therefore `dominatingEdge(bb1, bb2) and bb2.dominates(bb3)`
251+
* means that the edge `(bb1, bb2)` dominates `bb3`.
252252
*/
253253
pragma[nomagic]
254254
predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) {

0 commit comments

Comments
 (0)