MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / flush_fn_ref_candidates

Method flush_fn_ref_candidates

codegraph-kernel/src/dart.rs:2445–2474  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

2443 }
2444
2445 fn flush_fn_ref_candidates(&mut self) {
2446 let cands = std::mem::take(&mut self.fn_ref_cands);
2447 if cands.is_empty() || util::is_generated_file(self.file_path) {
2448 return;
2449 }
2450 let mut seen: HashSet<(String, String)> = HashSet::new();
2451 for c in cands {
2452 if !c.name.starts_with("this.")
2453 && !c.name.contains("::")
2454 && !self.defined_fn_names.contains(&c.name)
2455 && !self.imported_names.contains(&c.name)
2456 {
2457 continue;
2458 }
2459 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
2460 continue;
2461 }
2462 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
2463 let name_ref = self.arena.put(&c.name);
2464 self.tables.push_ref(&RefRow {
2465 from_idx: c.from,
2466 kind: FUNCTION_REF_CODE,
2467 line: c.line,
2468 column,
2469 reference_name: name_ref,
2470 candidates: NONE_STR,
2471 from_id_str: NONE_STR,
2472 });
2473 }
2474 }
2475
2476 // --- value-reference edges (:398-931) ---------------------------------
2477

Callers 1

extractFunction · 0.45

Calls 5

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.65
takeFunction · 0.50
push_refMethod · 0.45

Tested by

no test coverage detected