Struct Alignment
Specifies the alignment of the data referred to by a load or store operation.
Implements
Inherited Members
Namespace: Flame.Compiler.Instructions
Assembly: Flame.Compiler.dll
Syntax
public struct Alignment : IEquatable<Alignment>
Constructors
| Edit this page View SourceAlignment(uint)
Creates a particular alignment.
Declaration
public Alignment(uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | The alignment. |
Fields
| Edit this page View SourceNaturallyAligned
An alignment that represents natural alignment.
Declaration
public static readonly Alignment NaturallyAligned
Field Value
| Type | Description |
|---|---|
| Alignment |
Unaligned
An alignment that represents byte-alignment.
Declaration
public static readonly Alignment Unaligned
Field Value
| Type | Description |
|---|---|
| Alignment |
Properties
| Edit this page View SourceIsNaturallyAligned
Tells if this alignment represents a natural alignment, i.e., a pointer whose alignment matches the natural alignment of its element type.
Declaration
public bool IsNaturallyAligned { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsUnaligned
Tells if this alignment represents an unaligned pointer, i.e., a pointer that is byte-aligned.
Declaration
public bool IsUnaligned { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Value
Gets the alignment of a pointer: a factor by which the pointer is divisible.
Declaration
public readonly uint Value { get; }
Property Value
| Type | Description |
|---|---|
| uint | A pointer's alignment. |
Methods
| Edit this page View SourceEquals(Alignment)
Tests if this alignment is identical to another alignment.
Declaration
public bool Equals(Alignment other)
Parameters
| Type | Name | Description |
|---|---|---|
| Alignment | other | An alignment to compare with this one. |
Returns
| Type | Description |
|---|---|
| bool |
|
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(Alignment, Alignment)
Tests if two alignments are identical.
Declaration
public static bool operator ==(Alignment first, Alignment second)
Parameters
| Type | Name | Description |
|---|---|---|
| Alignment | first | The first alignment. |
| Alignment | second | The second alignment. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator !=(Alignment, Alignment)
Tests if two alignments are not identical.
Declaration
public static bool operator !=(Alignment first, Alignment second)
Parameters
| Type | Name | Description |
|---|---|---|
| Alignment | first | The first alignment. |
| Alignment | second | The second alignment. |
Returns
| Type | Description |
|---|---|
| bool |
|