class SyntaxTree::YARV::DataFlowGraph

Constructs a data-flow-graph of a YARV instruction sequence, via a control-flow-graph. Data flow is discovered locally and then globally. The graph only considers data flow through the stack - local variables and objects are considered fully escaped in this analysis.

You can use this class by calling the ::compile method and passing it a control flow graph. It will return a data flow graph object.

iseq = RubyVM::InstructionSequence.compile("1 + 2")
iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a)
cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq)
dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg)