Show / Hide Table of Contents

    Struct IrCodec

    An encoder/decoder for every configurable element of Flame's intermediate representation.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public struct IrCodec

    Constructors

    | Improve this Doc View Source

    IrCodec(Codec<Constant, LNode>, Codec<InstructionPrototype, LNode>, Codec<IType, LNode>, Codec<ITypeMember, LNode>, Codec<ITypeMember, LNode>, Codec<IType, LNode>, Codec<IAttribute, LNode>)

    Creates a codec for Flame IR from a number of sub-codecs.

    Declaration
    public IrCodec(Codec<Constant, LNode> constants, Codec<InstructionPrototype, LNode> instructionCodec, Codec<IType, LNode> typeCodec, Codec<ITypeMember, LNode> typeMemberCodec, Codec<ITypeMember, LNode> typeMemberDefinitionCodec, Codec<IType, LNode> typeDefinitionCodec, Codec<IAttribute, LNode> attributeCodec)
    Parameters
    Type Name Description
    Codec<Constant, Loyc.Syntax.LNode> constants

    A codec for constants.

    Codec<InstructionPrototype, Loyc.Syntax.LNode> instructionCodec

    An instruction prototype codec.

    Codec<IType, Loyc.Syntax.LNode> typeCodec

    A codec for type references.

    Codec<ITypeMember, Loyc.Syntax.LNode> typeMemberCodec

    A codec for type member references.

    Codec<ITypeMember, Loyc.Syntax.LNode> typeMemberDefinitionCodec

    A codec for type member definitions.

    Codec<IType, Loyc.Syntax.LNode> typeDefinitionCodec

    A codec for method definitions.

    Codec<IAttribute, Loyc.Syntax.LNode> attributeCodec

    A codec for attributes.

    Fields

    | Improve this Doc View Source

    Default

    The default codec for Flame IR as used by unmodified versions of Flame.

    Declaration
    public static IrCodec Default
    Field Value
    Type Description
    IrCodec

    Properties

    | Improve this Doc View Source

    Attributes

    Gets the encoder/decoder for attributes.

    Declaration
    public Codec<IAttribute, LNode> Attributes { get; }
    Property Value
    Type Description
    Codec<IAttribute, Loyc.Syntax.LNode>

    The attribute codec.

    | Improve this Doc View Source

    Constants

    Gets the encoder for constants.

    Declaration
    public Codec<Constant, LNode> Constants { get; }
    Property Value
    Type Description
    Codec<Constant, Loyc.Syntax.LNode>

    The constant codec.

    | Improve this Doc View Source

    Instructions

    Gets the encoder for instruction prototypes.

    Declaration
    public Codec<InstructionPrototype, LNode> Instructions { get; }
    Property Value
    Type Description
    Codec<InstructionPrototype, Loyc.Syntax.LNode>

    The instruction prototype codec.

    | Improve this Doc View Source

    TypeDefinitions

    Gets the encoder/decoder for type definitions.

    Declaration
    public Codec<IType, LNode> TypeDefinitions { get; }
    Property Value
    Type Description
    Codec<IType, Loyc.Syntax.LNode>

    The type definition codec.

    | Improve this Doc View Source

    TypeMemberDefinitions

    Gets the encoder/decoder for type member definitions.

    Declaration
    public Codec<ITypeMember, LNode> TypeMemberDefinitions { get; }
    Property Value
    Type Description
    Codec<ITypeMember, Loyc.Syntax.LNode>

    The type member definition codec.

    | Improve this Doc View Source

    TypeMembers

    Gets the encoder/decoder for type member references.

    Declaration
    public Codec<ITypeMember, LNode> TypeMembers { get; }
    Property Value
    Type Description
    Codec<ITypeMember, Loyc.Syntax.LNode>

    The type member reference codec.

    | Improve this Doc View Source

    Types

    Gets the encoder/decoder for type references.

    Declaration
    public Codec<IType, LNode> Types { get; }
    Property Value
    Type Description
    Codec<IType, Loyc.Syntax.LNode>

    The type reference codec.

    Methods

    | Improve this Doc View Source

    WithTypes(Codec<IType, LNode>)

    Creates an IR codec with a particular type codec. All other fields are copied from this codec.

    Declaration
    public IrCodec WithTypes(Codec<IType, LNode> typeCodec)
    Parameters
    Type Name Description
    Codec<IType, Loyc.Syntax.LNode> typeCodec

    A type codec.

    Returns
    Type Description
    IrCodec

    An IR codec.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX