Class ObjectIntrinsics
Supports creating, recognizing and parsing object-oriented intrinsics.
Inheritance
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public static class ObjectIntrinsics
Fields
| Improve this Doc View SourceNamespace
The namespace for object-oriented intrinsics.
Declaration
public static readonly IntrinsicNamespace Namespace
Field Value
Type | Description |
---|---|
IntrinsicNamespace |
Methods
| Improve this Doc View SourceCreatePrototype(String, IType, IReadOnlyList<IType>)
Creates an object-oriented intrinsic prototype.
Declaration
public static IntrinsicPrototype CreatePrototype(string operatorName, IType resultType, IReadOnlyList<IType> parameterTypes)
Parameters
Type | Name | Description |
---|---|---|
System.String | operatorName | The name of the operator represented by the object-oriented intrinsic. |
IType | resultType | The type of value produced by the intrinsic to create. |
System.Collections.Generic.IReadOnlyList<IType> | parameterTypes | The types of the values the intrinsic takes as arguments. |
Returns
Type | Description |
---|---|
IntrinsicPrototype | An object-oriented intrinsic prototype. |
CreateUnboxAnyPrototype(IType, IType)
Creates an 'unbox_any' instruction prototype. Its return type can either be a value type or a reference type (aka box pointer). If its return type is set to a value type, 'unbox_any' unboxes its argument and loads it. If 'unbox_any's return value is set to a reference type, 'unbox_any' checks that its argument is a subtype of the return type.
Declaration
public static IntrinsicPrototype CreateUnboxAnyPrototype(IType resultType, IType argumentType)
Parameters
Type | Name | Description |
---|---|---|
IType | resultType | The 'unbox_any' instruction prototype's result type. |
IType | argumentType | The 'unbox_any' instruction prototype's argument type. |
Returns
Type | Description |
---|---|
IntrinsicPrototype | An 'unbox_any' instruction prototype. |