MCPcopy Create free account
hub / github.com/argotorg/solidity / visit

Method visit

libyul/optimiser/CallGraphGenerator.cpp:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 std::vector<FunctionHandle> currentPath{};
43
44 void visit(FunctionHandle const& _function)
45 {
46 if (visited.count(_function))
47 return;
48 if (
49 auto it = find(currentPath.begin(), currentPath.end(), _function);
50 it != currentPath.end()
51 )
52 containedInCycle.insert(it, currentPath.end());
53 else
54 {
55 currentPath.emplace_back(_function);
56 if (callGraph.functionCalls.count(_function))
57 for (auto const& child: callGraph.functionCalls.at(_function))
58 visit(child);
59 currentPath.pop_back();
60 visited.insert(_function);
61 }
62 }
63};
64}
65

Callers 1

recursiveFunctionsMethod · 0.45

Calls 5

insertMethod · 0.80
atMethod · 0.80
countMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected