Class GCInterface
An application-GC interface, which defines how the application interacts with the GC. The application-GC interface's responsibilities include root set management, object allocation and the object header format.
Inherited Members
Namespace: Flame.Llvm
Assembly: Flame.Llvm.dll
Syntax
public abstract class GCInterface
Methods
| Improve this Doc View SourceEmitAllocArray(IType, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)
Emits LLVM IR instructions that allocate a new array.
Declaration
public abstract 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. |
EmitAllocObject(IType, ModuleBuilder, IRBuilder, String)
Emits instructions that allocate a GC-managed instance of a type.
Declaration
public LLVMValueRef EmitAllocObject(IType type, ModuleBuilder module, IRBuilder builder, string name)
Parameters
Type | Name | Description |
---|---|---|
IType | type | A type to instantiate. |
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. |
EmitAllocObject(IType, LLVMValueRef, ModuleBuilder, IRBuilder, String)
Emits instructions that allocate a GC-managed instance of a type.
Declaration
public abstract 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. |
EmitArrayElementAddress(LLVMValueRef, IType, IReadOnlyList<LLVMValueRef>, ModuleBuilder, IRBuilder, String)
Emits LLVM IR instructions that load the address of an element in an array.
Declaration
public abstract 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. |
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 abstract 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 |
EmitLoadMetadata(LLVMValueRef, ModuleBuilder, IRBuilder, String)
Emits instructions that load an object's metadata handle.
Declaration
public abstract 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. |