def detect_cycles():
for root_edge in roots:
reset_graph()
# Mark ignored classes as already visited
for ignore in args.ignore_classes:
name = ignore.find("::") > 0 and ignore or ("blink::" + ignore)
node = graph.get(name)
if node:
node.visited = True
src = graph[root_edge.src]
dst = graph.get(root_edge.dst)
if src.visited:
continue
if root_edge.dst == "WTF::String":
continue
if dst is None:
print "\nPersistent root to incomplete destination object:"
print root_edge
set_reported_error(True)
continue
# Find the shortest path from the root target (dst) to its host (src)
shortest_path(dst, src)
if src.cost < sys.maxint:
report_cycle(root_edge)
评论列表
文章目录