@@ -1568,15 +1568,21 @@ module MakeWithSplitting<
1568
1568
module BasicBlocks {
1569
1569
private import codeql.controlflow.BasicBlock as BB
1570
1570
1571
+ private class CfgScopeAlias = CfgScope ;
1572
+
1571
1573
private class NodeAlias = Node ;
1572
1574
1573
1575
private module BasicBlockInputSig implements BB:: InputSig< Location > {
1574
1576
class SuccessorType = Input:: SuccessorType ;
1575
1577
1576
1578
predicate successorTypeIsCondition = Input:: successorTypeIsCondition / 1 ;
1577
1579
1580
+ class CfgScope = CfgScopeAlias ;
1581
+
1578
1582
class Node = NodeAlias ;
1579
1583
1584
+ CfgScope nodeGetCfgScope ( Node node ) { result = node .getScope ( ) }
1585
+
1580
1586
Node nodeGetASuccessor ( Node node , SuccessorType t ) { result = node .getASuccessor ( t ) }
1581
1587
1582
1588
predicate nodeIsDominanceEntry ( Node node ) { node instanceof EntryNode }
@@ -1586,84 +1592,7 @@ module MakeWithSplitting<
1586
1592
1587
1593
private module BasicBlockImpl = BB:: Make< Location , BasicBlockInputSig > ;
1588
1594
1589
- /**
1590
- * A basic block, that is, a maximal straight-line sequence of control flow nodes
1591
- * without branches or joins.
1592
- */
1593
- final class BasicBlock extends BasicBlockImpl:: BasicBlock {
1594
- /** Gets the scope of this basic block. */
1595
- CfgScope getScope ( ) { result = this .getFirstNode ( ) .getScope ( ) }
1596
-
1597
- /** Gets an immediate successor of this basic block, if any. */
1598
- BasicBlock getASuccessor ( ) { result = super .getASuccessor ( ) }
1599
-
1600
- /** Gets an immediate successor of this basic block of a given type, if any. */
1601
- BasicBlock getASuccessor ( SuccessorType t ) { result = super .getASuccessor ( t ) }
1602
-
1603
- /** Gets an immediate predecessor of this basic block, if any. */
1604
- BasicBlock getAPredecessor ( ) { result = super .getAPredecessor ( ) }
1605
-
1606
- /** Gets an immediate predecessor of this basic block of a given type, if any. */
1607
- BasicBlock getAPredecessor ( SuccessorType t ) { result = super .getAPredecessor ( t ) }
1608
-
1609
- /**
1610
- * Holds if this basic block immediately dominates basic block `bb`.
1611
- *
1612
- * That is, `bb` is an immediate successor of this basic block and all
1613
- * paths reaching basic block `bb` from some entry point basic block must
1614
- * go through this basic block.
1615
- */
1616
- predicate immediatelyDominates ( BasicBlock bb ) { super .immediatelyDominates ( bb ) }
1617
-
1618
- /**
1619
- * Holds if this basic block strictly dominates basic block `bb`.
1620
- *
1621
- * That is, all paths reaching `bb` from some entry point basic block must
1622
- * go through this basic block and this basic block is different from `bb`.
1623
- */
1624
- predicate strictlyDominates ( BasicBlock bb ) { super .strictlyDominates ( bb ) }
1625
-
1626
- /**
1627
- * Holds if this basic block dominates basic block `bb`.
1628
- *
1629
- * That is, all paths reaching `bb` from some entry point basic block must
1630
- * go through this basic block.
1631
- */
1632
- predicate dominates ( BasicBlock bb ) { super .dominates ( bb ) }
1633
-
1634
- /**
1635
- * Holds if `df` is in the dominance frontier of this basic block. That is,
1636
- * this basic block dominates a predecessor of `df`, but does not dominate
1637
- * `df` itself.
1638
- */
1639
- predicate inDominanceFrontier ( BasicBlock df ) { super .inDominanceFrontier ( df ) }
1640
-
1641
- /**
1642
- * Gets the basic block that immediately dominates this basic block, if any.
1643
- *
1644
- * That is, all paths reaching this basic block from some entry point
1645
- * basic block must go through the result, which is an immediate basic block
1646
- * predecessor of this basic block.
1647
- */
1648
- BasicBlock getImmediateDominator ( ) { result = super .getImmediateDominator ( ) }
1649
-
1650
- /**
1651
- * Holds if this basic block strictly post-dominates basic block `bb`.
1652
- *
1653
- * That is, all paths reaching a normal exit point basic block from basic
1654
- * block `bb` must go through this basic block and this basic block is
1655
- * different from `bb`.
1656
- */
1657
- predicate strictlyPostDominates ( BasicBlock bb ) { super .strictlyPostDominates ( bb ) }
1658
-
1659
- /**
1660
- * Holds if this basic block post-dominates basic block `bb`.
1661
- *
1662
- * That is, all paths reaching a normal exit point basic block from basic
1663
- * block `bb` must go through this basic block.
1664
- */
1665
- predicate postDominates ( BasicBlock bb ) { super .postDominates ( bb ) }
1666
- }
1595
+ final class BasicBlock = BasicBlockImpl:: BasicBlock ;
1667
1596
1668
1597
/**
1669
1598
* An entry basic block, that is, a basic block whose first node is
0 commit comments