Class LoadFieldPrototype
An instruction prototype that loads a field. It is a fused instruction prototype that is equivalent to a get-field-pointer followed by a load.
Inherited Members
Namespace: Flame.Compiler.Instructions.Fused
Assembly: Flame.Compiler.dll
Syntax
public sealed class LoadFieldPrototype : FusedInstructionPrototype
Properties
| Improve this Doc View SourceField
Gets the field that is loaded.
Declaration
public IField Field { get; }
Property Value
Type | Description |
---|---|
IField | The field that is loaded. |
ParameterCount
Gets the number of arguments this instruction takes when instantiated.
Declaration
public override int ParameterCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of arguments this instruction takes. |
Overrides
Methods
| Improve this Doc View SourceCreate(IField)
Gets or creates an instruction prototype for instructions that load a particular field.
Declaration
public static LoadFieldPrototype Create(IField field)
Parameters
Type | Name | Description |
---|---|---|
IField | field | The field that is to be loaded. |
Returns
Type | Description |
---|---|
LoadFieldPrototype | A load-field instruction prototype. |
Expand(NamedInstructionBuilder)
Expands this fused instruction to an equivalent nonempty sequence of core instructions. The instance itself must be replaced by another instruction. Instruction expansion must be formulaic: it cannot depend on the rest of the control-flow graph.
Declaration
public override void Expand(NamedInstructionBuilder instance)
Parameters
Type | Name | Description |
---|---|---|
NamedInstructionBuilder | instance | An instance of this prototype to expand. |
Overrides
| Improve this Doc View SourceInstantiate(ValueTag)
Creates an instance of this load-field prototype.
Declaration
public Instruction Instantiate(ValueTag basePointer)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | basePointer | A pointer to a value that includes the field referred to by the load-field prototype. |
Returns
Type | Description |
---|---|
Instruction | A load-field instruction. |
Map(MemberMapping)
Applies a member mapping to this instruction prototype.
Declaration
public override InstructionPrototype Map(MemberMapping mapping)
Parameters
Type | Name | Description |
---|---|---|
MemberMapping | mapping | A member mapping. |
Returns
Type | Description |
---|---|
InstructionPrototype | A transformed instruction prototype. |