Skip to content

Commit e695477

Browse files
authored
Merge pull request #21290 from aschackmull/cfg/new-shared
Java/Cfg: Introduce new shared CFG library and replace the Java CFG.
2 parents 600f585 + 627654c commit e695477

File tree

143 files changed

+4526
-3821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+4526
-3821
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import java
2+
import ControlFlow::Consistency
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
category: breaking
3+
---
4+
* The Java control flow graph (CFG) implementation has been completely
5+
rewritten. The CFG now includes additional nodes to more accurately represent
6+
certain constructs. This also means that any existing code that implicitly
7+
relies on very specific details about the CFG may need to be updated.
8+
The CFG now only includes the nodes that are reachable from the entry point.
9+
Additionally, the following breaking changes have been made:
10+
- `ControlFlowNode.asCall` has been removed - use `Call.getControlFlowNode` instead.
11+
- `ControlFlowNode.getEnclosingStmt` has been removed.
12+
- `ControlFlow::ExprNode` has been removed.
13+
- `ControlFlow::StmtNode` has been removed.
14+
- `ControlFlow::Node` has been removed - this was merely an alias of
15+
`ControlFlowNode`, which is still available.
16+
- Previously deprecated predicates on `BasicBlock` have been removed.

java/ql/lib/printCfg.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ external int selectedSourceColumn();
2121

2222
private predicate selectedSourceColumnAlias = selectedSourceColumn/0;
2323

24-
module ViewCfgQueryInput implements ViewCfgQueryInputSig<File> {
24+
module ViewCfgQueryInput implements ControlFlow::ViewCfgQueryInputSig<File> {
2525
predicate selectedSourceFile = selectedSourceFileAlias/0;
2626

2727
predicate selectedSourceLine = selectedSourceLineAlias/0;
@@ -42,4 +42,4 @@ module ViewCfgQueryInput implements ViewCfgQueryInputSig<File> {
4242
}
4343
}
4444

45-
import ViewCfgQuery<File, ViewCfgQueryInput>
45+
import ControlFlow::ViewCfgQuery<File, ViewCfgQueryInput>

java/ql/lib/semmle/code/java/Completion.qll

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)