查找根函数(不调用其他函数的函数)
(&self)
| 191 | |
| 192 | /// 查找根函数(不调用其他函数的函数) |
| 193 | pub fn find_root_functions(&self) -> Vec<&FunctionInfo> { |
| 194 | if let Some(code_graph) = &self.code_graph { |
| 195 | code_graph.functions.values() |
| 196 | .filter(|f| code_graph.get_callees(&f.id).is_empty()) |
| 197 | .collect() |
| 198 | } else { |
| 199 | Vec::new() |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /// 按语言统计函数分布 |
| 204 | pub fn get_language_distribution(&self) -> HashMap<String, usize> { |
nothing calls this directly
no test coverage detected