Class: Relaton::Un::Wasm::ExportRef
- Inherits:
-
Struct
- Object
- Struct
- Relaton::Un::Wasm::ExportRef
- Defined in:
- lib/relaton/un/wasm/interpreter.rb
Instance Attribute Summary collapse
-
#instance ⇒ Object
Returns the value of attribute instance.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#instance ⇒ Object
Returns the value of attribute instance
35 36 37 |
# File 'lib/relaton/un/wasm/interpreter.rb', line 35 def instance @instance end |
#name ⇒ Object
Returns the value of attribute name
35 36 37 |
# File 'lib/relaton/un/wasm/interpreter.rb', line 35 def name @name end |
Instance Method Details
#to_func ⇒ Object
38 39 40 41 |
# File 'lib/relaton/un/wasm/interpreter.rb', line 38 def to_func func_idx = instance.export_index(name, :func) ->(*args) { instance.invoke_by_index(func_idx, args) } end |
#to_memory ⇒ Object
36 |
# File 'lib/relaton/un/wasm/interpreter.rb', line 36 def to_memory; MemoryAdapter.new(instance.memory); end |