Show / Hide Table of Contents

    Class ObjectMarshal<T>

    Encodes and/or decodes in-memory objects.

    Inheritance
    System.Object
    ObjectMarshal<T>
    ObjectDecoder<TObj, TPtr>
    ObjectEncoder<TObj, TPtr>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Flame.Llvm
    Assembly: Flame.Llvm.dll
    Syntax
    public abstract class ObjectMarshal<T>
    Type Parameters
    Name Description
    T

    The type of a decoded object.

    Constructors

    | Improve this Doc View Source

    ObjectMarshal(ModuleBuilder, LLVMTargetDataRef)

    Creates an object marshal.

    Declaration
    public ObjectMarshal(ModuleBuilder compiledModule, LLVMTargetDataRef target)
    Parameters
    Type Name Description
    ModuleBuilder compiledModule

    A compiled LLVM module to inspect for type data layouts.

    LLVMSharp.LLVMTargetDataRef target

    A target data layout to use for determining the precise layout of data types.

    Properties

    | Improve this Doc View Source

    CompiledModule

    Gets the compiled module whose in-memory representation is to be used for encoding objects.

    Declaration
    public ModuleBuilder CompiledModule { get; }
    Property Value
    Type Description
    ModuleBuilder

    A compiled module.

    | Improve this Doc View Source

    MetadataSize

    Gets the size of an object's metadata prefix, in bytes.

    Declaration
    public int MetadataSize { get; }
    Property Value
    Type Description
    System.Int32

    The size in bytes of an object's metadata.

    | Improve this Doc View Source

    Target

    Gets the target data to use for determining field offsets and type sizes.

    Declaration
    public LLVMTargetDataRef Target { get; }
    Property Value
    Type Description
    LLVMSharp.LLVMTargetDataRef

    LLVM target data.

    Methods

    | Improve this Doc View Source

    GetFieldOffset(IField)

    Gets the offset of a particular field.

    Declaration
    public int GetFieldOffset(IField field)
    Parameters
    Type Name Description
    IField field

    A non-static field.

    Returns
    Type Description
    System.Int32

    The field's offset in its parent type's layout.

    | Improve this Doc View Source

    SizeOf(IType)

    Gets a type's encoded size in bytes.

    Declaration
    public int SizeOf(IType type)
    Parameters
    Type Name Description
    IType type

    A type.

    Returns
    Type Description
    System.Int32

    The type's size in bytes.

    | Improve this Doc View Source

    SizeOfWithMetadata(IType, out Int32)

    Gets a type's encoded size in bytes.

    Declaration
    public int SizeOfWithMetadata(IType type, out int metadataSize)
    Parameters
    Type Name Description
    IType type

    A type.

    System.Int32 metadataSize

    The object's metadata size.

    Returns
    Type Description
    System.Int32

    The type's size in bytes, including the size of the metadata.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX