Class ConstantAnalysis<T>
An analysis that always returns the same result. This kind of analysis is particularly useful for adding metadata to flow graphs that encode a (user-specified) configuration, such as the exception delayability policy.
Inheritance
System.Object
ConstantAnalysis<T>
Implements
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.Analysis
Assembly: Flame.Compiler.dll
Syntax
public sealed class ConstantAnalysis<T> : IFlowGraphAnalysis<T>
Type Parameters
Name | Description |
---|---|
T | The type of result returned by the analysis. |
Constructors
| Improve this Doc View SourceConstantAnalysis(T)
Creates an analysis that returns a constant result.
Declaration
public ConstantAnalysis(T result)
Parameters
Type | Name | Description |
---|---|---|
T | result | The constant result returned by the analysis. |
Properties
| Improve this Doc View SourceResult
Gets the result that is returned when this analysis is coaxed into "analyzing" a flow graph.
Declaration
public T Result { get; }
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceAnalyze(FlowGraph)
Declaration
public T Analyze(FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph |
Returns
Type | Description |
---|---|
T |
AnalyzeWithUpdates(FlowGraph, T, IReadOnlyList<FlowGraphUpdate>)
Declaration
public T AnalyzeWithUpdates(FlowGraph graph, T previousResult, IReadOnlyList<FlowGraphUpdate> updates)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph | |
T | previousResult | |
System.Collections.Generic.IReadOnlyList<FlowGraphUpdate> | updates |
Returns
Type | Description |
---|---|
T |