• Visit all nodes reachable from the start node in the control flow graph, traversing the dependencies in execution order but ignoring cycles.

    Parameters

    • graph: ControlFlowGraph

      The control flow graph.

    • startNodes: readonly NodeId[]

      The nodes to start the traversal from.

    • visitor: (node: NodeId) => boolean | void

      The visitor function to call for each node, if you return true the traversal from this node will be stopped.

      This function is of type SimpleCfgVisitor.

    Returns Set<NodeId>

    visitCfgInReverseOrder for a traversal in reversed order