Class: Kumi::IR::Loop::Lower::LoopNode
- Inherits:
-
Object
- Object
- Kumi::IR::Loop::Lower::LoopNode
- Defined in:
- lib/kumi/ir/loop/lower.rb
Overview
A loop nest under construction. Nodes are kept in a mutable tree so materialization discovered later can still insert array_init/push nodes at the right places.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#end_node ⇒ Object
readonly
Returns the value of attribute end_node.
-
#parent_body ⇒ Object
Returns the value of attribute parent_body.
-
#pre ⇒ Object
readonly
Returns the value of attribute pre.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(start:, end_node:, parent_body:) ⇒ LoopNode
constructor
A new instance of LoopNode.
Constructor Details
#initialize(start:, end_node:, parent_body:) ⇒ LoopNode
Returns a new instance of LoopNode.
46 47 48 49 50 51 52 |
# File 'lib/kumi/ir/loop/lower.rb', line 46 def initialize(start:, end_node:, parent_body:) @pre = [] @start = start @body = [] @end_node = end_node @parent_body = parent_body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
43 44 45 |
# File 'lib/kumi/ir/loop/lower.rb', line 43 def body @body end |
#end_node ⇒ Object (readonly)
Returns the value of attribute end_node.
43 44 45 |
# File 'lib/kumi/ir/loop/lower.rb', line 43 def end_node @end_node end |
#parent_body ⇒ Object
Returns the value of attribute parent_body.
44 45 46 |
# File 'lib/kumi/ir/loop/lower.rb', line 44 def parent_body @parent_body end |
#pre ⇒ Object (readonly)
Returns the value of attribute pre.
43 44 45 |
# File 'lib/kumi/ir/loop/lower.rb', line 43 def pre @pre end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
43 44 45 |
# File 'lib/kumi/ir/loop/lower.rb', line 43 def start @start end |