Class: Kumi::IR::DF::Lower
- Inherits:
-
Object
- Object
- Kumi::IR::DF::Lower
- Defined in:
- lib/kumi/ir/df/lower.rb
Constant Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(snast_module:, registry:, input_table:, input_metadata: nil) ⇒ Lower
constructor
A new instance of Lower.
Constructor Details
#initialize(snast_module:, registry:, input_table:, input_metadata: nil) ⇒ Lower
Returns a new instance of Lower.
9 10 11 12 13 14 15 16 17 |
# File 'lib/kumi/ir/df/lower.rb', line 9 def initialize(snast_module:, registry:, input_table:, input_metadata: nil) @snast_module = snast_module @registry = registry @input_table = input_table @input_metadata = @graph = Graph.new(name: snast_module.respond_to?(:name) ? snast_module.name : :anonymous) @reg_counter = 0 @access_contract = AccessContract.new(@input_table) end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kumi/ir/df/lower.rb', line 19 def call @snast_module.decls.each do |name, decl| lower_declaration(name, decl) end @graph end |