getCallGraph method

Map<int, Set<String>> getCallGraph()

Gets the call graph as a map from call sites to methods.

Implementation

Map<int, Set<String>> getCallGraph() {
  final results = _engine.query('CallGraph');
  final map = <int, Set<String>>{};

  for (final tuple in results) {
    final site = tuple[0] as int;
    final method = tuple[1] as String;
    map.putIfAbsent(site, () => {}).add(method);
  }

  return map;
}