Show / Hide Table of Contents

    Class MetadataFormat

    A description of a member metadata format. Member metadata is used for type instance tests, virtual method lookup and reflection.

    Inheritance
    System.Object
    MetadataFormat
    ClosedMetadataFormat
    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 MetadataFormat

    Properties

    | Improve this Doc View Source

    TypesWithMetadata

    Gets a sequence containing all types that have metadata emitted into the module.

    Declaration
    public abstract IEnumerable<IType> TypesWithMetadata { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IType>

    A sequence of types.

    Methods

    | Improve this Doc View Source

    EmitIsSubtype(LLVMValueRef, IType, ModuleBuilder, IRBuilder, String)

    Emits LLVM IR instructions that test if the type corresponding to a type metadata handle is a subtype of another type.

    Declaration
    public abstract LLVMValueRef EmitIsSubtype(LLVMValueRef subtypeMetadata, IType supertype, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    LLVMSharp.LLVMValueRef subtypeMetadata

    A type metadata handle of a potential subtype.

    IType supertype

    A potential supertype.

    ModuleBuilder module

    The LLVM module to generate the instructions in.

    LLVMSharp.IRBuilder builder

    An instruction builder to use for emitting instructions.

    System.String name

    A suggested name for the resulting Boolean value.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A Boolean value that is true if the type corresponding to subtypeMetadata is a subtype of supertype; otherwise, false.

    | Improve this Doc View Source

    EmitMethodAddress(IMethod, LLVMValueRef, ModuleBuilder, IRBuilder, String)

    Builds LLVM IR instructions that perform a virtual method lookup: loads the address of the implementation of a virtual method given a type metadata pointer for the 'this' type.

    Declaration
    public abstract LLVMValueRef EmitMethodAddress(IMethod callee, LLVMValueRef metadata, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    IMethod callee

    A virtual method to find an implementation for.

    LLVMSharp.LLVMValueRef metadata

    A handle to the type metadata of the 'this' type.

    ModuleBuilder module

    The LLVM module to generate the instructions in.

    LLVMSharp.IRBuilder builder

    An instruction builder to use for emitting instructions.

    System.String name

    A suggested name for the value that refers to the method implementation address.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A pointer to a method implementation.

    | Improve this Doc View Source

    GetMetadata(IType, ModuleBuilder)

    Builds LLVM IR instructions that get a handle to the metadata for a particular type.

    Declaration
    public abstract LLVMValueRef GetMetadata(IType type, ModuleBuilder module)
    Parameters
    Type Name Description
    IType type

    The type whose metadata is to be inspected.

    ModuleBuilder module

    The LLVM module to generate the metadata in.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A metadata pointer.

    | Improve this Doc View Source

    GetMetadataType(ModuleBuilder)

    Gets the type of a type metadata handle.

    Declaration
    public abstract LLVMTypeRef GetMetadataType(ModuleBuilder module)
    Parameters
    Type Name Description
    ModuleBuilder module

    A module.

    Returns
    Type Description
    LLVMSharp.LLVMTypeRef

    The type of a type metadata handle.

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