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>Inheritance
Section titled “Inheritance”Object → WasmFunctionInfo
Implements
Section titled “Implements”Constructors
Section titled “Constructors”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)Properties
Section titled “Properties”BodyOffset
Section titled “BodyOffset”The file offset of the function body payload, including local declarations.
Returns: Nullable<Int64>
public long? BodyOffset { get; init; }BodySize
Section titled “BodySize”The body payload size in bytes.
Returns: Int32
public int BodySize { get; init; }CodeOffset
Section titled “CodeOffset”The file offset of the first instruction byte after local declarations.
Returns: Nullable<Int64>
public long? CodeOffset { get; init; }CodeSize
Section titled “CodeSize”The instruction byte count after local declarations.
Returns: Int32
public int CodeSize { get; init; }ExportNames
Section titled “ExportNames”All export names that point at this function.
Returns: IReadOnlyList<String>
public IReadOnlyList<string> ExportNames { get; init; }ImportModule
Section titled “ImportModule”The import module for imported functions.
Returns: String
public string? ImportModule { get; init; }ImportName
Section titled “ImportName”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; }IsExported
Section titled “IsExported”Whether the function is exported.
Returns: Boolean
public bool IsExported { get; init; }IsImported
Section titled “IsImported”Whether the function is imported and has no body in this module.
Returns: Boolean
public bool IsImported { get; init; }Locals
Section titled “Locals”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; }NameSource
Section titled “NameSource”Where the display name came from.
Returns: String
public string NameSource { get; init; }ParamTypes
Section titled “ParamTypes”The raw Wasm parameter type bytes.
Returns: IReadOnlyList<Byte>
public IReadOnlyList<byte> ParamTypes { get; init; }ResultTypes
Section titled “ResultTypes”The raw Wasm result type bytes.
Returns: IReadOnlyList<Byte>
public IReadOnlyList<byte> ResultTypes { get; init; }TypeIndex
Section titled “TypeIndex”The function type index, when known.
Returns: Nullable<Int32>
public int? TypeIndex { get; init; }