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.
49 50 51 52 53 54 55 |
# File 'lib/kumi/ir/loop/lower.rb', line 49 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.
46 47 48 |
# File 'lib/kumi/ir/loop/lower.rb', line 46 def body @body end |
#end_node ⇒ Object (readonly)
Returns the value of attribute end_node.
46 47 48 |
# File 'lib/kumi/ir/loop/lower.rb', line 46 def end_node @end_node end |
#parent_body ⇒ Object
Returns the value of attribute parent_body.
47 48 49 |
# File 'lib/kumi/ir/loop/lower.rb', line 47 def parent_body @parent_body end |
#pre ⇒ Object (readonly)
Returns the value of attribute pre.
46 47 48 |
# File 'lib/kumi/ir/loop/lower.rb', line 46 def pre @pre end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
46 47 48 |
# File 'lib/kumi/ir/loop/lower.rb', line 46 def start @start end |