Sha256: 70500554f2c37591373f7137eeeff230b8dcf03d12578772b6a9e6053b945f1d

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

require_relative 'branch'

module DeepCover
  class Node
    class ShortCircuit < Node
      include Branch
      has_tracker :conditional
      has_child lhs: Node
      has_child conditional: Node, flow_entry_count: :conditional_tracker_hits,
        rewrite: '((%{conditional_tracker};%{node}))'

      def branches
        [
          conditional,
          TrivialBranch.new(condition: lhs, other_branch: conditional)
        ]
      end
    end

    And = Or = ShortCircuit
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.13 lib/deep_cover/node/short_circuit.rb