Class: SyntaxTree::YARV::SeaOfNodes::MergeNode
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::SeaOfNodes::MergeNode
- Defined in:
- lib/syntax_tree/yarv/sea_of_nodes.rb
Overview
Merge nodes are present in any block that has multiple incoming blocks. It provides a place for Phi nodes to attach their results.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#outputs ⇒ Object
readonly
Returns the value of attribute outputs.
Instance Method Summary collapse
-
#initialize(id) ⇒ MergeNode
constructor
A new instance of MergeNode.
- #label ⇒ Object
Constructor Details
#initialize(id) ⇒ MergeNode
Returns a new instance of MergeNode.
55 56 57 58 59 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 55 def initialize(id) @inputs = [] @outputs = [] @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
53 54 55 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 53 def id @id end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
53 54 55 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 53 def inputs @inputs end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
53 54 55 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 53 def outputs @outputs end |
Instance Method Details
#label ⇒ Object
61 62 63 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 61 def label "#{id} ψ" end |