Skip to content

WasmFunctionInfo

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

A WebAssembly function, imported or defined in the code section.

public sealed record WasmFunctionInfo : IEquatable<WasmFunctionInfo>

ObjectWasmFunctionInfo

WasmFunctionInfo(int, int?, string, string, bool, string?, string?, bool, IReadOnlyList<string>, long?, int, long?, int, IReadOnlyList<WasmLocalInfo>, IReadOnlyList<byte>, IReadOnlyList<byte>)

Section titled “WasmFunctionInfo(int, int?, string, string, bool, string?, string?, bool, IReadOnlyList<string>, long?, int, long?, int, IReadOnlyList<WasmLocalInfo>, IReadOnlyList<byte>, IReadOnlyList<byte>)”

A WebAssembly function, imported or defined in the code section.

Parameters:

  • Index (Int32): The module-wide function index, including imported functions.
  • TypeIndex (Nullable<Int32>): The function type index, when known.
  • Name (String): The best display name for the function.
  • NameSource (String): Where the display name came from.
  • IsImported (Boolean): Whether the function is imported and has no body in this module.
  • ImportModule (String): The import module for imported functions.
  • ImportName (String): The import name for imported functions.
  • IsExported (Boolean): Whether the function is exported.
  • ExportNames (IReadOnlyList<String>): All export names that point at this function.
  • BodyOffset (Nullable<Int64>): The file offset of the function body payload, including local declarations.
  • BodySize (Int32): The body payload size in bytes.
  • CodeOffset (Nullable<Int64>): The file offset of the first instruction byte after local declarations.
  • CodeSize (Int32): The instruction byte count after local declarations.
  • Locals (IReadOnlyList<WasmLocalInfo>): The function’s run-length encoded local declarations.
  • ParamTypes (IReadOnlyList<Byte>): The raw Wasm parameter type bytes.
  • ResultTypes (IReadOnlyList<Byte>): The raw Wasm result type bytes.
public WasmFunctionInfo(int Index, int? TypeIndex, string Name, string NameSource, bool IsImported, string? ImportModule, string? ImportName, bool IsExported, IReadOnlyList<string> ExportNames, long? BodyOffset, int BodySize, long? CodeOffset, int CodeSize, IReadOnlyList<WasmLocalInfo> Locals, IReadOnlyList<byte> ParamTypes, IReadOnlyList<byte> ResultTypes)

The file offset of the function body payload, including local declarations.

Returns: Nullable<Int64>

public long? BodyOffset { get; init; }

The body payload size in bytes.

Returns: Int32

public int BodySize { get; init; }

The file offset of the first instruction byte after local declarations.

Returns: Nullable<Int64>

public long? CodeOffset { get; init; }

The instruction byte count after local declarations.

Returns: Int32

public int CodeSize { get; init; }

All export names that point at this function.

Returns: IReadOnlyList<String>

public IReadOnlyList<string> ExportNames { get; init; }

The import module for imported functions.

Returns: String

public string? ImportModule { get; init; }

The import name for imported functions.

Returns: String

public string? ImportName { get; init; }

The module-wide function index, including imported functions.

Returns: Int32

public int Index { get; init; }

Whether the function is exported.

Returns: Boolean

public bool IsExported { get; init; }

Whether the function is imported and has no body in this module.

Returns: Boolean

public bool IsImported { get; init; }

The function’s run-length encoded local declarations.

Returns: IReadOnlyList<WasmLocalInfo>

public IReadOnlyList<WasmLocalInfo> Locals { get; init; }

The best display name for the function.

Returns: String

public string Name { get; init; }

Where the display name came from.

Returns: String

public string NameSource { get; init; }

The raw Wasm parameter type bytes.

Returns: IReadOnlyList<Byte>

public IReadOnlyList<byte> ParamTypes { get; init; }

The raw Wasm result type bytes.

Returns: IReadOnlyList<Byte>

public IReadOnlyList<byte> ResultTypes { get; init; }

The function type index, when known.

Returns: Nullable<Int32>

public int? TypeIndex { get; init; }