Search Results for

    Show / Hide Table of Contents

    Class ClosedMetadataFormat

    A VTable-based metadata format based on the closed-world assumption, that is, the set of all members is known at compile time and will not change.

    Inheritance
    object
    MetadataFormat
    ClosedMetadataFormat
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Llvm
    Assembly: Flame.Llvm.dll
    Syntax
    public sealed class ClosedMetadataFormat : MetadataFormat

    Constructors

    | Edit this page View Source

    ClosedMetadataFormat(IEnumerable<IType>, IEnumerable<ITypeMember>)

    Creates a metadata format description.

    Declaration
    public ClosedMetadataFormat(IEnumerable<IType> types, IEnumerable<ITypeMember> typeMembers)
    Parameters
    Type Name Description
    IEnumerable<IType> types

    All types that are to be included in the metadata.

    IEnumerable<ITypeMember> typeMembers

    All type members that are to be included in the metadata.

    Properties

    | Edit this page View Source

    TypesWithMetadata

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

    Declaration
    public override IEnumerable<IType> TypesWithMetadata { get; }
    Property Value
    Type Description
    IEnumerable<IType>

    A sequence of types.

    Overrides
    MetadataFormat.TypesWithMetadata

    Methods

    | Edit this page 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 override LLVMValueRef EmitIsSubtype(LLVMValueRef subtypeMetadata, IType supertype, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    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.

    IRBuilder builder

    An instruction builder to use for emitting instructions.

    string name

    A suggested name for the resulting Boolean value.

    Returns
    Type Description
    LLVMValueRef

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

    Overrides
    MetadataFormat.EmitIsSubtype(LLVMValueRef, IType, ModuleBuilder, IRBuilder, string)
    | Edit this page 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 override LLVMValueRef EmitMethodAddress(IMethod callee, LLVMValueRef metadataPointer, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    IMethod callee

    A virtual method to find an implementation for.

    LLVMValueRef metadataPointer
    ModuleBuilder module

    The LLVM module to generate the instructions in.

    IRBuilder builder

    An instruction builder to use for emitting instructions.

    string name

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

    Returns
    Type Description
    LLVMValueRef

    A pointer to a method implementation.

    Overrides
    MetadataFormat.EmitMethodAddress(IMethod, LLVMValueRef, ModuleBuilder, IRBuilder, string)
    | Edit this page View Source

    GetMetadata(IType, ModuleBuilder)

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

    Declaration
    public override 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
    LLVMValueRef

    A metadata pointer.

    Overrides
    MetadataFormat.GetMetadata(IType, ModuleBuilder)
    | Edit this page View Source

    GetMetadataType(ModuleBuilder)

    Gets the type of a type metadata handle.

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

    A module.

    Returns
    Type Description
    LLVMTypeRef

    The type of a type metadata handle.

    Overrides
    MetadataFormat.GetMetadataType(ModuleBuilder)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX