table

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupFunction

func LookupFunction(
	module api.Module, tableIndex uint32, tableOffset uint32,
	expectedParamTypes, expectedResultTypes []api.ValueType,
) api.Function

LookupFunction tries to get an api.Function from the table instance specified by `tableIndex` and `tableOffset` in the given api.Module. The user of this function must be well aware of the structure of the given api.Module, and the offset and table index must be valid. If this fails to find it, e.g. table is not found, table offset is out of range, violates the expected types, this panics according to the same semantics as call_indirect instruction: https://www.w3.org/TR/2022/WD-wasm-core-2-20220419/exec/instructions.html#xref-syntax-instructions-syntax-instr-control-mathsf-call-indirect-x-y

  • `module` is a module instance to look up the function.
  • `tableIndex` is the index of the table instance in the module.
  • `tableOffset` is the offset of the lookup target in the table.
  • `expectedParamTypes` and `expectedResultTypes` are used to check the type of the function found in the table.

Note: the returned api.Function is always valid, i.e. not nil, if this returns without panic.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL