Show / Hide Table of Contents

    Class MallocInterface

    A "GC" interface that uses the malloc function to allocate memory. No memory is ever freed.

    Inheritance
    System.Object
    GCInterface
    MallocInterface
    Inherited Members
    GCInterface.EmitAllocObject(IType, ModuleBuilder, IRBuilder, String)
    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 sealed class MallocInterface : GCInterface

    Fields

    | Improve this Doc View Source

    Instance

    An instance of the malloc "GC" interface.

    Declaration
    public static readonly MallocInterface Instance
    Field Value
    Type Description
    MallocInterface

    Methods

    | Improve this Doc View Source

    EmitAllocArray(IType, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)

    Emits LLVM IR instructions that allocate a new array.

    Declaration
    public override LLVMValueRef EmitAllocArray(IType arrayType, IType elementType, IReadOnlyList<LLVMValueRef> dimensions, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    IType arrayType

    The type of the array to allocate.

    IType elementType

    The type of the values stored in the array.

    System.Collections.Generic.IReadOnlyList<LLVMSharp.LLVMValueRef> dimensions

    The array's dimensions, as sequence of integer values.

    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 array pointer.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A value that points to an array.

    Overrides
    GCInterface.EmitAllocArray(IType, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)
    | Improve this Doc View Source

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

    Emits instructions that allocate a GC-managed instance of a type.

    Declaration
    public override LLVMValueRef EmitAllocObject(IType type, LLVMValueRef tailRoom, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    IType type

    A type to instantiate.

    LLVMSharp.LLVMValueRef tailRoom

    A number of bytes to allocate after the end of the object.

    ModuleBuilder module

    The module that defines the object-allocating instructions.

    LLVMSharp.IRBuilder builder

    An instruction builder to use for emitting instructions.

    System.String name

    A suggested name for the value that refers to the allocated object.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A pointer to the allocated object.

    Overrides
    GCInterface.EmitAllocObject(IType, LLVMValueRef, ModuleBuilder, IRBuilder, String)
    | Improve this Doc View Source

    EmitArrayElementAddress(LLVMValueRef, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)

    Emits LLVM IR instructions that load the address of an element in an array.

    Declaration
    public override LLVMValueRef EmitArrayElementAddress(LLVMValueRef array, IType elementType, IReadOnlyList<LLVMValueRef> indices, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    LLVMSharp.LLVMValueRef array

    The array value to inspect.

    IType elementType

    The type of the values stored in the array.

    System.Collections.Generic.IReadOnlyList<LLVMSharp.LLVMValueRef> indices

    The indices into array, as sequence of integer values.

    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 array pointer.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A value that points to an array.

    Overrides
    GCInterface.EmitArrayElementAddress(LLVMValueRef, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)
    | Improve this Doc View Source

    EmitArrayLength(LLVMValueRef, IType, Int32, ModuleBuilder, IRBuilder, String)

    Emits LLVM IR instructions that compute an array's total length, that is, the product of its dimensions.

    Declaration
    public override LLVMValueRef EmitArrayLength(LLVMValueRef array, IType elementType, int dimensions, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    LLVMSharp.LLVMValueRef array

    The array value to inspect.

    IType elementType

    The type of the values stored in the array.

    System.Int32 dimensions

    The dimensionality of array.

    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 array pointer.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    The product of array's dimensions.

    Overrides
    GCInterface.EmitArrayLength(LLVMValueRef, IType, Int32, ModuleBuilder, IRBuilder, String)
    | Improve this Doc View Source

    EmitLoadMetadata(LLVMValueRef, ModuleBuilder, IRBuilder, String)

    Emits instructions that load an object's metadata handle.

    Declaration
    public override LLVMValueRef EmitLoadMetadata(LLVMValueRef objectPointer, ModuleBuilder module, IRBuilder builder, string name)
    Parameters
    Type Name Description
    LLVMSharp.LLVMValueRef objectPointer

    An object to inspect for its metadata handle.

    ModuleBuilder module

    The module that defines the metadata-loading instructions.

    LLVMSharp.IRBuilder builder

    An instruction builder to use for emitting instructions.

    System.String name

    A suggested name for the value that refers to the metadata.

    Returns
    Type Description
    LLVMSharp.LLVMValueRef

    A handle to the metadata.

    Overrides
    GCInterface.EmitLoadMetadata(LLVMValueRef, ModuleBuilder, IRBuilder, String)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX