Class: SyntaxTree::YARV::SeaOfNodes::PhiNode
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::SeaOfNodes::PhiNode
- Defined in:
- lib/syntax_tree/yarv/sea_of_nodes.rb
Overview
Phi nodes are used to represent the merging of data flow from multiple incoming blocks.
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) ⇒ PhiNode
constructor
A new instance of PhiNode.
- #label ⇒ Object
Constructor Details
#initialize(id) ⇒ PhiNode
Returns a new instance of PhiNode.
39 40 41 42 43 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 39 def initialize(id) @inputs = [] @outputs = [] @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
37 38 39 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 37 def id @id end |
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
37 38 39 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 37 def inputs @inputs end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
37 38 39 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 37 def outputs @outputs end |
Instance Method Details
#label ⇒ Object
45 46 47 |
# File 'lib/syntax_tree/yarv/sea_of_nodes.rb', line 45 def label "#{id} φ" end |