MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / get_or_insert_node

Method get_or_insert_node

src/analysis/pointsto/mod.rs:206–214  ·  view source on GitHub ↗
(&mut self, node: ConstraintNode<'tcx>)

Source from the content-addressed store, hash-verified

204
205impl<'tcx> ConstraintGraph<'tcx> {
206 fn get_or_insert_node(&mut self, node: ConstraintNode<'tcx>) -> NodeIndex {
207 if let Some(idx) = self.node_map.get(&node) {
208 *idx
209 } else {
210 let idx = self.graph.add_node(node.clone());
211 self.node_map.insert(node, idx);
212 idx
213 }
214 }
215
216 fn get_node(&self, node: &ConstraintNode<'tcx>) -> Option<NodeIndex> {
217 self.node_map.get(node).copied()

Callers 9

add_allocMethod · 0.80
add_constantMethod · 0.80
add_addressMethod · 0.80
add_copyMethod · 0.80
add_copy_constantMethod · 0.80
add_loadMethod · 0.80
add_storeMethod · 0.80
add_store_constantMethod · 0.80
add_alias_copyMethod · 0.80

Calls 2

add_nodeMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected