Class: Relaton::Un::Wasm::Module
- Inherits:
-
Object
- Object
- Relaton::Un::Wasm::Module
- Defined in:
- lib/relaton/un/wasm/module.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
-
#exports ⇒ Object
readonly
Returns the value of attribute exports.
-
#function_type_indices ⇒ Object
readonly
Returns the value of attribute function_type_indices.
-
#globals ⇒ Object
readonly
Returns the value of attribute globals.
-
#imports ⇒ Object
readonly
Returns the value of attribute imports.
-
#memories ⇒ Object
readonly
Returns the value of attribute memories.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Class Method Summary collapse
Instance Method Summary collapse
-
#imported_function_count ⇒ Object
Number of imported functions (they precede module-defined functions in the funcidx space).
-
#initialize ⇒ Module
constructor
A new instance of Module.
Constructor Details
#initialize ⇒ Module
Returns a new instance of Module.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/relaton/un/wasm/module.rb', line 21 def initialize @types = [] @imports = [] @function_type_indices = [] @tables = [] @memories = [] @globals = [] @exports = [] @elements = [] @code = [] @data = [] @start = nil end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def data @data end |
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def elements @elements end |
#exports ⇒ Object (readonly)
Returns the value of attribute exports.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def exports @exports end |
#function_type_indices ⇒ Object (readonly)
Returns the value of attribute function_type_indices.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def function_type_indices @function_type_indices end |
#globals ⇒ Object (readonly)
Returns the value of attribute globals.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def globals @globals end |
#imports ⇒ Object (readonly)
Returns the value of attribute imports.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def imports @imports end |
#memories ⇒ Object (readonly)
Returns the value of attribute memories.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def memories @memories end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def start @start end |
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def tables @tables end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
18 19 20 |
# File 'lib/relaton/un/wasm/module.rb', line 18 def types @types end |
Class Method Details
Instance Method Details
#imported_function_count ⇒ Object
Number of imported functions (they precede module-defined functions in the funcidx space).
41 42 43 |
# File 'lib/relaton/un/wasm/module.rb', line 41 def imported_function_count @imports.count { |i| i.kind == :func } end |