Show / Hide Table of Contents

    Class TailRecursionElimination

    A transform that rewrites static calls to the current method just prior to a return as unconditional jumps to the entry point.

    Inheritance
    System.Object
    Optimization
    TailRecursionElimination
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Flame.Compiler.Transforms
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class TailRecursionElimination : Optimization

    Fields

    | Improve this Doc View Source

    Instance

    An instance of the tail recursion elimination optimization.

    Declaration
    public static readonly TailRecursionElimination Instance
    Field Value
    Type Description
    TailRecursionElimination

    A tail recursion elimination optimization.

    Properties

    | Improve this Doc View Source

    IsCheckpoint

    Tells if this optimization checkpoints its result. The optimizer takes care to always return the latest checkpointed method body is returned when a method's optimized method body is requested.

    Declaration
    public override bool IsCheckpoint { get; }
    Property Value
    Type Description
    System.Boolean

    Tells if this optimization performs a checkpoint.

    Overrides
    Optimization.IsCheckpoint

    Methods

    | Improve this Doc View Source

    Apply(FlowGraph, IMethod)

    Applies the tail recursion elimination transform to a particular method.

    Declaration
    public FlowGraph Apply(FlowGraph graph, IMethod method)
    Parameters
    Type Name Description
    FlowGraph graph

    A control-flow graph to optimize.

    IMethod method

    The method that has graph as its body.

    Returns
    Type Description
    FlowGraph

    An optimized control-flow graph.

    | Improve this Doc View Source

    ApplyAsync(MethodBody, OptimizationState)

    Applies the optimization to a method body.

    Declaration
    public override Task<MethodBody> ApplyAsync(MethodBody body, OptimizationState state)
    Parameters
    Type Name Description
    MethodBody body

    A method body holder to optimize.

    OptimizationState state

    State associated with optimizations.

    Returns
    Type Description
    System.Threading.Tasks.Task<MethodBody>

    A task that produces an optimized method body.

    Overrides
    Optimization.ApplyAsync(MethodBody, OptimizationState)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX