Skip to content

Commit 6cf214c

Browse files
yoffCopilot
andcommitted
Cache Python shared CFG node mapping
The canonical injects-to-Python-AST mapping is evaluated repeatedly across DCA prewarm and target stages. Cache getNode so this truthful mapping forms a reusable evaluation boundary without changing its semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 529363f5-bc7d-4f0b-9f47-e03ba9aa0cdf
1 parent f3ce181 commit 6cf214c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • python/ql/lib/semmle/python/controlflow/internal

‎python/ql/lib/semmle/python/controlflow/internal/Cfg.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private import codeql.controlflow.SuccessorType
3535
*/
3636
class ControlFlowNode extends CfgImpl::ControlFlowNode {
3737
/** Gets the syntactic element corresponding to this flow node, if any. */
38+
cached
3839
Py::AstNode getNode() {
3940
exists(CfgImpl::Ast::AstNode n | this.injects(n) | result = CfgImpl::astNodeToPyNode(n))
4041
}

0 commit comments

Comments
 (0)