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