Show / Hide Table of Contents

    Struct Alignment

    Specifies the alignment of the data referred to by a load or store operation.

    Implements
    System.IEquatable<Alignment>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame.Compiler.Instructions
    Assembly: Flame.Compiler.dll
    Syntax
    public struct Alignment : IEquatable<Alignment>

    Constructors

    | Improve this Doc View Source

    Alignment(UInt32)

    Creates a particular alignment.

    Declaration
    public Alignment(uint value)
    Parameters
    Type Name Description
    System.UInt32 value

    The alignment.

    Fields

    | Improve this Doc View Source

    NaturallyAligned

    An alignment that represents natural alignment.

    Declaration
    public static readonly Alignment NaturallyAligned
    Field Value
    Type Description
    Alignment
    | Improve this Doc View Source

    Unaligned

    An alignment that represents byte-alignment.

    Declaration
    public static readonly Alignment Unaligned
    Field Value
    Type Description
    Alignment

    Properties

    | Improve this Doc View Source

    IsNaturallyAligned

    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
    System.Boolean
    | Improve this Doc View Source

    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
    System.Boolean
    | Improve this Doc View Source

    Value

    Gets the alignment of a pointer: a factor by which the pointer is divisible.

    Declaration
    public uint Value { get; }
    Property Value
    Type Description
    System.UInt32

    A pointer's alignment.

    Methods

    | Improve this Doc View Source

    Equals(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
    System.Boolean

    true if the alignments are identical; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    Operators

    | Improve this Doc View Source

    Equality(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
    System.Boolean

    true if the alignments are identical; otherwise, false.

    | Improve this Doc View Source

    Inequality(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
    System.Boolean

    false if the alignments are identical; otherwise, true.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX