Sha256: cd8e82d12e6aa4c41ef6bb36a1a8d8aabf0eaf4e93f94f9bd9af40f93cad689e
Contents?: true
Size: 727 Bytes
Versions: 6
Compression:
Stored size: 727 Bytes
Contents
module Furnace::CFG class Edge attr_accessor :source_operation, :source_label, :target_label def initialize(cfg, source_operation, source_label, target_label) @cfg, @source_operation, @source_label, @target_label = cfg, source_operation, source_label, target_label end def source @cfg.find_node(@source_label) end def target @cfg.find_node(@target_label) if @target_label end def source=(node) @source_label = node.label end def target=(node) if node @target_label = node.label else @target_label = nil end end def inspect "<#{@source_label.inspect} -> #{@target_label.inspect}>" end end end
Version data entries
6 entries across 6 versions & 1 rubygems