Class MallocInterface
A "GC" interface that uses the malloc function to allocate memory. No memory is ever freed.
Inherited Members
Namespace: Flame.Llvm
Assembly: Flame.Llvm.dll
Syntax
public sealed class MallocInterface : GCInterface
Fields
| Improve this Doc View SourceInstance
An instance of the malloc "GC" interface.
Declaration
public static readonly MallocInterface Instance
Field Value
Type | Description |
---|---|
MallocInterface |
Methods
| Improve this Doc View SourceEmitAllocArray(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
| Improve this Doc View SourceEmitAllocObject(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
| Improve this Doc View SourceEmitArrayElementAddress(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 |
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
| Improve this Doc View SourceEmitArrayLength(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 |
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 |
Overrides
| Improve this Doc View SourceEmitLoadMetadata(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. |