1 instantiation of IncrementalGeneratorRunStep
Microsoft.CodeAnalysis (1)
SourceGeneration\Nodes\NodeStateTable.cs (1)
493new IncrementalGeneratorRunStep(
76 references to IncrementalGeneratorRunStep
Microsoft.CodeAnalysis (66)
SourceGeneration\GeneratorState.cs (12)
26ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 27ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 41ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 42ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 55ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 56ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 76ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, 77ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 100ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 101ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty, 123internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> ExecutedSteps { get; } 125internal ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> OutputSteps { get; }
SourceGeneration\IncrementalGeneratorRunStep.cs (2)
16internal IncrementalGeneratorRunStep(string? stepName, ImmutableArray<(IncrementalGeneratorRunStep Source, int OutputIndex)> inputs, ImmutableArray<(object Value, IncrementalStepRunReason OutputState)> outputs, TimeSpan elapsedTime) 27public ImmutableArray<(IncrementalGeneratorRunStep Source, int OutputIndex)> Inputs { get; }
SourceGeneration\Nodes\BatchNode.cs (2)
33private (ImmutableArray<TInput>, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)>) GetValuesAndInputs( 39var sourceInputsBuilder = newTable.TrackIncrementalSteps ? ArrayBuilder<(IncrementalGeneratorRunStep InputStep, int OutputIndex)>.GetInstance() : null;
SourceGeneration\Nodes\CombineNode.cs (2)
58(TInput2 input2, IncrementalGeneratorRunStep? input2Step) = input2Table.Single(); 92(_, IncrementalGeneratorRunStep? input2Step) = input2Table.Single();
SourceGeneration\Nodes\GeneratorRunStateTable.cs (18)
15private GeneratorRunStateTable(ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> executedSteps, ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps) 21public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> ExecutedSteps { get; } 23public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> OutputSteps { get; } 27private readonly Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? _namedSteps; 28private readonly Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? _outputSteps; 34_namedSteps = new Dictionary<string, HashSet<IncrementalGeneratorRunStep>>(); 35_outputSteps = new Dictionary<string, HashSet<IncrementalGeneratorRunStep>>(); 43foreach (var step in table.Steps) 57private static ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> StepCollectionToImmutable(Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? builder) 61return ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Empty; 64ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>>.Builder resultBuilder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<IncrementalGeneratorRunStep>>(); 74private void RecordStepTree(IncrementalGeneratorRunStep step, bool addToOutputSteps) 93static void addToNamedStepCollection(Dictionary<string, HashSet<IncrementalGeneratorRunStep>> stepCollectionBuilder, IncrementalGeneratorRunStep step) 98stepsByName = new HashSet<IncrementalGeneratorRunStep>();
SourceGeneration\Nodes\InputNode.cs (1)
66var noInputStepsStepInfo = tableBuilder.TrackIncrementalSteps ? ImmutableArray<(IncrementalGeneratorRunStep, int)>.Empty : default;
SourceGeneration\Nodes\NodeStateTable.cs (23)
52ImmutableArray<IncrementalGeneratorRunStep> Steps { get; } 55internal readonly record struct NodeStateEntry<T>(T Item, EntryState State, int OutputIndex, IncrementalGeneratorRunStep? Step); 63internal static NodeStateTable<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false); 67private NodeStateTable(ImmutableArray<TableEntry> states, ImmutableArray<IncrementalGeneratorRunStep> steps, bool hasTrackedSteps, bool isCached) 88public ImmutableArray<IncrementalGeneratorRunStep> Steps { get; } 98private IncrementalGeneratorRunStep? _step; 172return new NodeStateTable<T>(compacted.ToImmutableAndFree(), ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: false, isCached: true); 177public (T item, IncrementalGeneratorRunStep? step) Single() 233private readonly ArrayBuilder<IncrementalGeneratorRunStep>? _steps; 262_steps = ArrayBuilder<IncrementalGeneratorRunStep>.GetInstance(); 268public bool TryRemoveEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs) 284public bool TryRemoveEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, out OneOrMany<T> entries) 296public bool TryUseCachedEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs) 311internal bool TryUseCachedEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, out TableEntry entry) 323public bool TryModifyEntry(T value, IEqualityComparer<T> comparer, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 344public bool TryModifyEntries(ImmutableArray<T> outputs, IEqualityComparer<T> comparer, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 436public bool TryModifyEntries(ImmutableArray<T> outputs, IEqualityComparer<T> comparer, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState, out TableEntry entry) 448public void AddEntry(T value, EntryState state, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 455public TableEntry AddEntries(ImmutableArray<T> values, EntryState state, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 475private void RecordStepInfoForLastEntry(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 501public IReadOnlyList<IncrementalGeneratorRunStep> Steps => (IReadOnlyList<IncrementalGeneratorRunStep>?)_steps ?? ImmutableArray<IncrementalGeneratorRunStep>.Empty;
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
68var noInputStepsStepInfo = _filterTable.TrackIncrementalSteps ? ImmutableArray<(IncrementalGeneratorRunStep, int)>.Empty : default;
SourceGeneration\Nodes\SyntaxReceiverStrategy.cs (1)
63_nodeStateTable.AddEntry(_receiver, EntryState.Modified, lastElapsedTime, TrackIncrementalSteps ? System.Collections.Immutable.ImmutableArray<(IncrementalGeneratorRunStep, int)>.Empty : default, EntryState.Modified);
SourceGeneration\RunResults.cs (4)
85ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> namedSteps, 86ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> outputSteps, 151public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> TrackedSteps { get; } 159public ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> TrackedOutputSteps { get; }
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
SourceGeneration\StateTableTests.cs (10)
309var emptyInputSteps = ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)>.Empty; 443var step = Assert.Single(table.Steps); 490var step = Assert.Single(table.Steps); 946List<IncrementalGeneratorRunStep> steps = new(); 956var addOneStep = table.Steps[0]; 958var doubleStep = addOneStep.Inputs[0].Source; 960var filterNodeStep = doubleStep.Inputs[0].Source; 962var transformNodeStep = filterNodeStep.Inputs[0].Source; 984var step = Assert.Single(table.Steps); 1013var step = Assert.Single(table.Steps);