Class StorePrototype
A prototype for store instructions that set the value of a pointer's pointee.
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public sealed class StorePrototype : InstructionPrototype
  Properties
| Improve this Doc View SourceAlignment
Gets the pointer alignment of pointers written to by this prototype.
Declaration
public Alignment Alignment { get; }
  Property Value
| Type | Description | 
|---|---|
| Alignment | The pointer alignment of pointers written to by this prototype.  | 
      
IsVolatile
Tests if instances of this store prototype are volatile operations. Volatile operations may not be reordered with regard to each other.
Declaration
public bool IsVolatile { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
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
| Improve this Doc View SourceResultType
Gets the type of value produced instantiations of this prototype.
Declaration
public override IType ResultType { get; }
  Property Value
| Type | Description | 
|---|---|
| IType | A type of value.  | 
      
Overrides
Methods
| Improve this Doc View SourceCheckConformance(Instruction, MethodBody)
Checks if a particular instance of this prototype conforms to the rules for this instruction prototype.
Declaration
public override IReadOnlyList<string> CheckConformance(Instruction instance, MethodBody body)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Instruction | instance | An instance of this prototype.  | 
      
| MethodBody | body | The method body that defines the instruction.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<System.String> | A list of conformance errors in the instruction.  | 
      
Overrides
| Improve this Doc View SourceCreate(IType, Boolean, Alignment)
Gets or creates a store instruction prototype for a particular element type.
Declaration
public static StorePrototype Create(IType elementType, bool isVolatile = false, Alignment alignment = default(Alignment))
  Parameters
| Type | Name | Description | 
|---|---|---|
| IType | elementType | The type of element to store in a pointer.  | 
      
| System.Boolean | isVolatile | Tells if instances of the store prototype are volatile operations. Volatile operations may not be reordered with regard to each other.  | 
      
| Alignment | alignment | The pointer alignment of pointers written to by the prototype.  | 
      
Returns
| Type | Description | 
|---|---|
| StorePrototype | A store instruction prototype.  | 
      
GetPointer(Instruction)
Gets the pointer to which a store is performed by an instance of this prototype.
Declaration
public ValueTag GetPointer(Instruction instance)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Instruction | instance | An instance of this prototype.  | 
      
Returns
| Type | Description | 
|---|---|
| ValueTag | The pointer whose pointee's value is replaced.  | 
      
GetValue(Instruction)
Gets the value with which a store instruction's pointee is replaced.
Declaration
public ValueTag GetValue(Instruction instance)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Instruction | instance | An instance of this prototype.  | 
      
Returns
| Type | Description | 
|---|---|
| ValueTag | The stored value.  | 
      
Instantiate(ValueTag, ValueTag)
Creates an instance of this store prototype.
Declaration
public Instruction Instantiate(ValueTag pointer, ValueTag value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ValueTag | pointer | A pointer to the value to replace.  | 
      
| ValueTag | value | The value to store in the pointer's pointee.  | 
      
Returns
| Type | Description | 
|---|---|
| Instruction | A store 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.  | 
      
Overrides
| Improve this Doc View SourceWithAlignment(Alignment)
Gets a variant of this store prototype with a particular alignment.
Declaration
public StorePrototype WithAlignment(Alignment alignment)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Alignment | alignment | The alignment to assign to the store.  | 
      
Returns
| Type | Description | 
|---|---|
| StorePrototype | A store prototype that copies all properties from this one, except for
its alignment, which is set to   | 
      
WithVolatility(Boolean)
Gets a variant of this store prototype with a particular volatility.
Declaration
public StorePrototype WithVolatility(bool isVolatile)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | isVolatile | The volatility to assign to the store.  | 
      
Returns
| Type | Description | 
|---|---|
| StorePrototype | A store prototype that copies all properties from this one, except for
its volatility, which is set to   |