Search Results for

    Show / Hide Table of Contents

    Class ObjectMarshal<T>

    Encodes and/or decodes in-memory objects.

    Inheritance
    object
    ObjectMarshal<T>
    ObjectDecoder<TObj, TPtr>
    ObjectEncoder<TObj, TPtr>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    | Edit this page 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.

    LLVMTargetDataRef target

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

    Properties

    | Edit this page 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.

    | Edit this page View Source

    MetadataSize

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

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

    The size in bytes of an object's metadata.

    | Edit this page 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
    LLVMTargetDataRef

    LLVM target data.

    Methods

    | Edit this page 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
    int

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

    | Edit this page 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
    int

    The type's size in bytes.

    | Edit this page View Source

    SizeOfWithMetadata(IType, out int)

    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.

    int metadataSize

    The object's metadata size.

    Returns
    Type Description
    int

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

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX