Class TypeEnvironment
A base class for classes that augment Flame's type system with types specific to a particular environment
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public abstract class TypeEnvironment
Properties
| Improve this Doc View SourceBoolean
Gets the Boolean type in this type environment. Booleans are represented by the UInt1 type.
Declaration
public IType Boolean { get; }
Property Value
Type | Description |
---|---|
IType | The Boolean type aka UInt1. |
CapturedException
Gets the canonical type of a captured exception in this environment.
Declaration
public abstract IType CapturedException { get; }
Property Value
Type | Description |
---|---|
IType | The captured exception type. |
Char
Gets the character type in this type environment.
Declaration
public abstract IType Char { get; }
Property Value
Type | Description |
---|---|
IType | The character type. |
FieldToken
Gets the canonical type of a field token in this environment, if there is such a type.
Declaration
public abstract IType FieldToken { get; }
Property Value
Type | Description |
---|---|
IType | The field token type. |
Float32
Gets the 32-bit floating point type in this type environment.
Declaration
public abstract IType Float32 { get; }
Property Value
Type | Description |
---|---|
IType | A 32-bit floating point type. |
Float64
Gets the 64-bit floating point type in this type environment.
Declaration
public abstract IType Float64 { get; }
Property Value
Type | Description |
---|---|
IType | A 64-bit floating point type. |
Int16
Gets a 16-bit signed integer type.
Declaration
public IType Int16 { get; }
Property Value
Type | Description |
---|---|
IType | A 16-bit signed integer type if one can be created;
otherwise, |
Int32
Gets a 32-bit signed integer type.
Declaration
public IType Int32 { get; }
Property Value
Type | Description |
---|---|
IType | A 32-bit signed integer type if one can be created;
otherwise, |
Int64
Gets a 64-bit signed integer type.
Declaration
public IType Int64 { get; }
Property Value
Type | Description |
---|---|
IType | A 64-bit signed integer type if one can be created;
otherwise, |
Int8
Gets an 8-bit signed integer type.
Declaration
public IType Int8 { get; }
Property Value
Type | Description |
---|---|
IType | An 8-bit signed integer type if one can be created;
otherwise, |
MethodToken
Gets the canonical type of a method token in this environment, if there is such a type.
Declaration
public abstract IType MethodToken { get; }
Property Value
Type | Description |
---|---|
IType | The method token type. |
NaturalInt
Gets the natural signed integer type in this type environment.
Declaration
public abstract IType NaturalInt { get; }
Property Value
Type | Description |
---|---|
IType | The natural signed integer type. |
NaturalUInt
Gets the natural unsigned integer type in this type environment.
Declaration
public abstract IType NaturalUInt { get; }
Property Value
Type | Description |
---|---|
IType | The natural unsigned integer type. |
Object
Gets the root type for this environment, if there is a root type.
Declaration
public abstract IType Object { get; }
Property Value
Type | Description |
---|---|
IType | The root type. |
String
Gets the character string type in this type environment.
Declaration
public abstract IType String { get; }
Property Value
Type | Description |
---|---|
IType | The character string type. |
Subtyping
Gets the subtyping rules for this type environment.
Declaration
public abstract SubtypingRules Subtyping { get; }
Property Value
Type | Description |
---|---|
SubtypingRules | The subtyping rules. |
TypeToken
Gets the canonical type of a type token in this environment, if there is such a type.
Declaration
public abstract IType TypeToken { get; }
Property Value
Type | Description |
---|---|
IType | The type token type. |
UInt16
Gets a 16-bit unsigned integer type.
Declaration
public IType UInt16 { get; }
Property Value
Type | Description |
---|---|
IType | A 16-bit unsigned integer type if one can be created;
otherwise, |
UInt32
Gets a 32-bit unsigned integer type.
Declaration
public IType UInt32 { get; }
Property Value
Type | Description |
---|---|
IType | A 32-bit unsigned integer type if one can be created;
otherwise, |
UInt64
Gets a 64-bit unsigned integer type.
Declaration
public IType UInt64 { get; }
Property Value
Type | Description |
---|---|
IType | A 64-bit unsigned integer type if one can be created;
otherwise, |
UInt8
Gets an 8-bit unsigned integer type.
Declaration
public IType UInt8 { get; }
Property Value
Type | Description |
---|---|
IType | An 8-bit unsigned integer type if one can be created;
otherwise, |
Void
Gets the Void type in this type environment.
Declaration
public abstract IType Void { get; }
Property Value
Type | Description |
---|---|
IType | The Void type. |
Methods
| Improve this Doc View SourceMakeArrayType(IType, Int32)
Creates an array type of a particular rank.
Declaration
public IType MakeArrayType(IType elementType, int rank)
Parameters
Type | Name | Description |
---|---|---|
IType | elementType | The type of element stored in the array. |
System.Int32 | rank | The array's rank. |
Returns
Type | Description |
---|---|
IType | An array type if one can be created in this environment;
otherwise, |
MakeSignedIntegerType(Int32)
Creates a signed integer type with a particular number of bits of storage.
Declaration
public IType MakeSignedIntegerType(int sizeInBits)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sizeInBits | The integer type's size in bits. |
Returns
Type | Description |
---|---|
IType | A signed integer type if one can be created;
otherwise, |
MakeUnsignedIntegerType(Int32)
Creates an unsigned integer type with a particular number of bits of storage.
Declaration
public IType MakeUnsignedIntegerType(int sizeInBits)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sizeInBits | The integer type's size in bits. |
Returns
Type | Description |
---|---|
IType | An unsigned integer type if one can be created;
otherwise, |
TryMakeArrayType(IType, Int32, out IType)
Tries to create an array type with a particular element type and rank.
Declaration
public abstract bool TryMakeArrayType(IType elementType, int rank, out IType arrayType)
Parameters
Type | Name | Description |
---|---|---|
IType | elementType | The type of value to store in the array. |
System.Int32 | rank | The rank of the array, that is, the number of dimensions in the array. |
IType | arrayType | An array with the specified element type and rank. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryMakeSignedIntegerType(Int32, out IType)
Tries to create a signed integer type with a particular number of bits of storage.
Declaration
public abstract bool TryMakeSignedIntegerType(int sizeInBits, out IType integerType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sizeInBits | The size in bits of the integer type to create. |
IType | integerType | The integer type. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryMakeUnsignedIntegerType(Int32, out IType)
Tries to create an unsigned integer type with a particular number of bits of storage.
Declaration
public abstract bool TryMakeUnsignedIntegerType(int sizeInBits, out IType integerType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sizeInBits | The size in bits of the integer type to create. |
IType | integerType | The integer type. |
Returns
Type | Description |
---|---|
System.Boolean |
|