Search Results for

    Show / Hide Table of Contents

    Class NewDelegatePrototype

    A prototype for an instruction that creates a delegate from a method.

    Inheritance
    object
    InstructionPrototype
    NewDelegatePrototype
    Inherited Members
    InstructionPrototype.Members
    InstructionPrototype.Instantiate(IReadOnlyList<ValueTag>)
    InstructionPrototype.IsPrototypeOf(Instruction)
    InstructionPrototype.AssertIsPrototypeOf(Instruction, string)
    InstructionPrototype.AssertIsPrototypeOf(Instruction)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Instructions
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class NewDelegatePrototype : InstructionPrototype

    Properties

    | Edit this page View Source

    Callee

    Gets the method that is called by the delegate when invoked.

    Declaration
    public IMethod Callee { get; }
    Property Value
    Type Description
    IMethod

    The callee method.

    | Edit this page View Source

    HasThisArgument

    Tells if this new-delegate instruction prototype takes a 'this' argument. For instance methods, the 'this' argument is simply interpreted as the 'this' pointer. For static methods, the 'this' argument is sent to the first parameter in the parameter list.

    Declaration
    public bool HasThisArgument { get; }
    Property Value
    Type Description
    bool

    true if this instruction prototype takes a 'this' argument; otherwise, false.

    | Edit this page View Source

    Lookup

    Gets the method lookup strategy for this new-delegate instruction prototype.

    Declaration
    public MethodLookup Lookup { get; }
    Property Value
    Type Description
    MethodLookup

    The method lookup strategy.

    | Edit this page View Source

    ParameterCount

    Gets the number of arguments this instruction takes when instantiated.

    Declaration
    public override int ParameterCount { get; }
    Property Value
    Type Description
    int

    The number of arguments this instruction takes.

    Overrides
    InstructionPrototype.ParameterCount
    | Edit this page View Source

    ResultType

    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
    InstructionPrototype.ResultType

    Methods

    | Edit this page View Source

    CheckConformance(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
    IReadOnlyList<string>

    A list of conformance errors in the instruction.

    Overrides
    InstructionPrototype.CheckConformance(Instruction, MethodBody)
    | Edit this page View Source

    Create(IType, IMethod, bool, MethodLookup)

    Gets or creates a new-delegate instruction prototype.

    Declaration
    public static NewDelegatePrototype Create(IType delegateType, IMethod callee, bool hasThisArgument, MethodLookup lookup)
    Parameters
    Type Name Description
    IType delegateType

    The type of delegate produced by instances of the prototype.

    IMethod callee

    The method that is invoked when the delegates produced by instances of the prototype are called.

    bool hasThisArgument

    Tells if a 'this' argument is included in the delegate.

    MethodLookup lookup

    The method lookup strategy for the prototype.

    Returns
    Type Description
    NewDelegatePrototype

    A new-delegate instruction prototype.

    | Edit this page View Source

    GetThisArgument(Instruction)

    Gets the 'this' argument in an instruction that conforms to this prototype.

    Declaration
    public ValueTag GetThisArgument(Instruction instruction)
    Parameters
    Type Name Description
    Instruction instruction

    An instruction that conforms to this prototype.

    Returns
    Type Description
    ValueTag

    The 'this' argument.

    | Edit this page View Source

    Instantiate(ValueTag)

    Creates an instance of this new-delegate instruction prototype.

    Declaration
    public Instruction Instantiate(ValueTag thisArgument)
    Parameters
    Type Name Description
    ValueTag thisArgument

    The 'this' argument, if any. A null value means that there is no 'this' argument.

    Returns
    Type Description
    Instruction

    A new-delegate instruction.

    | Edit this page View Source

    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
    InstructionPrototype.Map(MemberMapping)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX