Class: Kumi::IR::Buf::Lower
- Inherits:
-
Object
- Object
- Kumi::IR::Buf::Lower
- Defined in:
- lib/kumi/ir/buf/lower.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(vec_module:) ⇒ Lower
constructor
A new instance of Lower.
Constructor Details
#initialize(vec_module:) ⇒ Lower
Returns a new instance of Lower.
7 8 9 |
# File 'lib/kumi/ir/buf/lower.rb', line 7 def initialize(vec_module:) @vec_module = vec_module end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kumi/ir/buf/lower.rb', line 11 def call buf_module = Buf::Module.new(name: @vec_module.name) @vec_module.each_function do |fn| buf_module.add_function( Buf::Function.new( name: fn.name, parameters: fn.parameters, blocks: fn.blocks, return_stamp: fn.return_stamp ) ) end buf_module end |