Skip to content

Commit 3005439

Browse files
committed
cache the BasicBlock charpred
1 parent 5afb7e0 commit 3005439

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/BasicBlocks.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ private predicate bbIPostDominates(BasicBlock dom, BasicBlock bb) =
119119
* At the database level, a basic block is represented by its first control flow node.
120120
*/
121121
class BasicBlock extends @cfg_node, NodeInStmtContainer {
122-
BasicBlock() { startsBB(this) }
122+
cached
123+
BasicBlock() { Stages::BasicBlocks::ref() and startsBB(this) }
123124

124125
/** Gets a basic block succeeding this one. */
125126
BasicBlock getASuccessor() { succBB(this, result) }

0 commit comments

Comments
 (0)