Class StoreFieldPrototype
An instruction prototype that stores a field. It is a fused instruction prototype that is equivalent to a get-field-pointer followed by a store.
Inherited Members
Namespace: Flame.Compiler.Instructions.Fused
Assembly: Flame.Compiler.dll
Syntax
public sealed class StoreFieldPrototype : 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 store a value in a particular field.
Declaration
public static StoreFieldPrototype Create(IField field)
Parameters
Type | Name | Description |
---|---|---|
IField | field | The field that is to be updated. |
Returns
Type | Description |
---|---|
StoreFieldPrototype | A store-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, ValueTag)
Creates an instance of this store-field prototype.
Declaration
public Instruction Instantiate(ValueTag basePointer, ValueTag value)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | basePointer | A pointer to a value that includes the field referred to by the store-field prototype. |
ValueTag | value | The value to store in the field. |
Returns
Type | Description |
---|---|
Instruction | A store-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. |