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

Method flush_fn_ref_candidates

codegraph-kernel/src/java.rs:1222–1253  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1220 }
1221
1222 fn flush_fn_ref_candidates(&mut self) {
1223 let cands = std::mem::take(&mut self.fn_ref_cands);
1224 if cands.is_empty() || util::is_generated_file(self.file_path) {
1225 return;
1226 }
1227 let mut seen: HashSet<(String, String)> = HashSet::new();
1228 for c in cands {
1229 if !c.name.starts_with("this.")
1230 && !c.name.contains("::")
1231 && !self.defined_fn_names.contains(&c.name)
1232 && !self.imported_names.contains(&c.name)
1233 {
1234 continue;
1235 }
1236 // Dedupe on the node ID string (ids collide; the TS side keys on
1237 // `${fromNodeId}|${name}`).
1238 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1239 continue;
1240 }
1241 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1242 let name_ref = self.arena.put(&c.name);
1243 self.tables.push_ref(&RefRow {
1244 from_idx: c.from,
1245 kind: FUNCTION_REF_CODE,
1246 line: c.line,
1247 column,
1248 reference_name: name_ref,
1249 candidates: NONE_STR,
1250 from_id_str: NONE_STR,
1251 });
1252 }
1253 }
1254
1255 // --- value references ------------------------------------------------------------
1256

Callers 1

extractFunction · 0.45

Calls 4

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

Tested by

no test coverage detected