3 instantiations of NodeStateTable
Microsoft.CodeAnalysis (3)
SourceGeneration\Nodes\NodeStateTable.cs (3)
63
internal static NodeStateTable<T> Empty { get; } = new
NodeStateTable
<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false);
172
return new
NodeStateTable
<T>(compacted.ToImmutableAndFree(), ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: false, isCached: true);
550
return new
NodeStateTable
<T>(
125 references to NodeStateTable
Microsoft.CodeAnalysis (77)
SourceGeneration\Nodes\BatchNode.cs (7)
34
NodeStateTable
<TInput> sourceTable,
35
NodeStateTable
<ImmutableArray<TInput>>? previousTable,
36
NodeStateTable
<ImmutableArray<TInput>>.Builder newTable)
111
public
NodeStateTable
<ImmutableArray<TInput>> UpdateStateTable(DriverStateTable.Builder builder,
NodeStateTable
<ImmutableArray<TInput>>? previousTable, CancellationToken cancellationToken)
114
var
sourceTable = builder.GetLatestStateTableForNode(_sourceNode);
145
var
newTable = tableBuilder.ToImmutableAndFree();
SourceGeneration\Nodes\CombineNode.cs (9)
31
public
NodeStateTable
<(TInput1, TInput2)> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<(TInput1, TInput2)>? previousTable, CancellationToken cancellationToken)
34
var
input1Table = graphState.GetLatestStateTableForNode(_input1);
35
var
input2Table = graphState.GetLatestStateTableForNode(_input2);
83
var
newTable = tableBuilder.ToImmutableAndFree();
88
private
NodeStateTable
<(TInput1, TInput2)> RecordStepsForCachedTable(DriverStateTable.Builder graphState,
NodeStateTable
<(TInput1, TInput2)> previousTable,
NodeStateTable
<TInput1> input1Table,
NodeStateTable
<TInput2> input2Table)
SourceGeneration\Nodes\DriverStateTable.cs (7)
48
public
NodeStateTable
<T> GetLatestStateTableForNode<T>(IIncrementalGeneratorNode<T> source)
53
return (
NodeStateTable
<T>)table;
57
NodeStateTable
<T>? previousTable = _previousTable._tables.GetStateTable<T>(source);
60
var
newTable = source.UpdateStateTable(this, previousTable, _cancellationToken);
65
public
NodeStateTable
<T>.Builder CreateTableBuilder<T>(
66
NodeStateTable
<T>? previousTable, string? stepName, IEqualityComparer<T>? equalityComparer, int? tableCapacity = null)
68
previousTable ??=
NodeStateTable
<T>.Empty;
SourceGeneration\Nodes\HostOutputNode.cs (4)
33
public
NodeStateTable
<OutputType> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<OutputType>? previousTable, CancellationToken cancellationToken)
36
var
sourceTable = graphState.GetLatestStateTableForNode(_source);
71
var
table = context.TableBuilder!.GetLatestStateTableForNode(this);
SourceGeneration\Nodes\IIncrementalGeneratorNode.cs (2)
16
NodeStateTable
<T> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<T>? previousTable, CancellationToken cancellationToken);
SourceGeneration\Nodes\InputNode.cs (7)
44
public
NodeStateTable
<T> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<T>? previousTable, CancellationToken cancellationToken)
105
var
newTable = tableBuilder.ToImmutableAndFree();
122
private void LogTables(
NodeStateTable
<T>? previousTable,
NodeStateTable
<T> newTable, ImmutableArray<T> inputs)
130
var tableBuilder =
NodeStateTable
<T>.Empty.ToBuilder(_name, stepTrackingEnabled: false, tableCapacity: inputs.Length);
135
var
inputTable = tableBuilder.ToImmutableAndFree();
SourceGeneration\Nodes\NodeExtensions.cs (8)
9
public static void LogTables<TSelf, TInput>(this IIncrementalGeneratorNode<TSelf> self, string? name, string? tableType,
NodeStateTable
<TSelf>? previousTable,
NodeStateTable
<TSelf> newTable,
NodeStateTable
<TInput> inputTable)
12
public static void LogTables<TSelf, TInput1, TInput2>(this IIncrementalGeneratorNode<TSelf> self, string? name, string? tableType,
NodeStateTable
<TSelf>? previousTable,
NodeStateTable
<TSelf> newTable,
NodeStateTable
<TInput1> inputNode1,
NodeStateTable
<TInput2>? inputNode2)
17
var
newTableOpt = newTable != previousTable ? newTable : null;
SourceGeneration\Nodes\NodeStateTable.cs (11)
63
internal static
NodeStateTable
<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false);
95
private readonly
NodeStateTable
<T> _stateTable;
102
public Enumerator(
NodeStateTable
<T> stateTable)
149
public
NodeStateTable
<T> AsCached()
186
public
NodeStateTable
<T> CreateCachedTableWithUpdatedSteps<TInput>(
NodeStateTable
<TInput> inputTable, string? stepName, IEqualityComparer<T> equalityComparer)
189
NodeStateTable
<T>.Builder builder = ToBuilder(stepName, stepTrackingEnabled: true, equalityComparer);
229
private readonly
NodeStateTable
<T> _previous;
245
NodeStateTable
<T> previous,
518
public
NodeStateTable
<T> ToImmutableAndFree()
525
return
NodeStateTable
<T>.Empty;
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (3)
41
private readonly
NodeStateTable
<SyntaxNode>.Builder _filterTable;
43
private readonly
NodeStateTable
<T>.Builder _transformTable;
83
if (state != EntryState.Cached || !_filterTable.TryUseCachedEntries(TimeSpan.Zero, noInputStepsStepInfo, out
NodeStateTable
<SyntaxNode>.TableEntry entry))
SourceGeneration\Nodes\SourceOutputNode.cs (5)
40
public
NodeStateTable
<TOutput> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<TOutput>? previousTable, CancellationToken cancellationToken)
43
var
sourceTable = graphState.GetLatestStateTableForNode(_source);
87
var
newTable = tableBuilder.ToImmutableAndFree();
102
var
table = context.TableBuilder.GetLatestStateTableForNode(this);
SourceGeneration\Nodes\StateTableStore.cs (4)
23
public
NodeStateTable
<T> GetStateTableOrEmpty<T>(object input)
25
return GetStateTable<T>(input) ??
NodeStateTable
<T>.Empty;
28
public
NodeStateTable
<T>? GetStateTable<T>(object input)
32
return (
NodeStateTable
<T>)output;
SourceGeneration\Nodes\SyntaxInputNode.cs (3)
31
public
NodeStateTable
<T> UpdateStateTable(DriverStateTable.Builder graphState,
NodeStateTable
<T>? previousTable, CancellationToken cancellationToken)
33
return (
NodeStateTable
<T>)graphState.SyntaxStore.GetSyntaxInputTable(this, graphState.GetLatestStateTableForNode(SharedInputNodes.SyntaxTrees));
SourceGeneration\Nodes\SyntaxReceiverStrategy.cs (1)
35
private readonly
NodeStateTable
<ISyntaxContextReceiver?>.Builder _nodeStateTable;
SourceGeneration\Nodes\TransformNode.cs (4)
46
public
NodeStateTable
<TOutput> UpdateStateTable(DriverStateTable.Builder builder,
NodeStateTable
<TOutput>? previousTable, CancellationToken cancellationToken)
49
var
sourceTable = builder.GetLatestStateTableForNode(_sourceNode);
99
var
newTable = tableBuilder.ToImmutableAndFree();
SourceGeneration\SyntaxStore.cs (2)
49
public IStateTable GetSyntaxInputTable(SyntaxInputNode syntaxInputNode,
NodeStateTable
<SyntaxTree> syntaxTreeTable)
84
NodeStateTable
<SyntaxTree> syntaxTreeState = syntaxTreeTable;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (48)
SourceGeneration\StateTableTests.cs (48)
27
var
table = builder.ToImmutableAndFree();
40
var
table = builder.ToImmutableAndFree();
53
var
table = builder.ToImmutableAndFree();
68
var
table = builder.ToImmutableAndFree();
82
var
previousTable = builder.ToImmutableAndFree();
89
var
newTable = builder.ToImmutableAndFree();
112
var
table = builder.ToImmutableAndFree();
117
var
compactedTable = table.AsCached();
129
var
table = builder.ToImmutableAndFree();
134
var
compactedTable = table.AsCached();
139
var
compactedTable2 = compactedTable.AsCached();
148
var
table = builder.ToImmutableAndFree();
158
var
table = builder.ToImmutableAndFree();
182
var
previousTable = builder.ToImmutableAndFree();
192
var
newTable = builder.ToImmutableAndFree();
206
var
previousTable = builder.ToImmutableAndFree();
217
var
newTable = builder.ToImmutableAndFree();
230
var
previousTable = builder.ToImmutableAndFree();
239
var
newTable = builder.ToImmutableAndFree();
282
var
newTable = nodeBuilder.ToImmutableAndFree();
314
var
newTable = nodeBuilder.ToImmutableAndFree();
377
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
423
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
441
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
488
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
534
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
554
var
table = dstBuilder.GetLatestStateTableForNode(batchNode);
604
var
table1 = dstBuilder.GetLatestStateTableForNode(inputNode);
610
var
table2 = dstBuilder.GetLatestStateTableForNode(batchNode);
636
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
671
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
709
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
748
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
786
var
table = dstBuilder.GetLatestStateTableForNode(inputNode);
840
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
875
var
table = dstBuilder.GetLatestStateTableForNode(combineNode);
928
var
table = dstBuilder.GetLatestStateTableForNode(inputNode);
954
var
table = dstBuilder.GetLatestStateTableForNode(addOneNode);
982
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
1011
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
1033
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
1074
var
table = dstBuilder.GetLatestStateTableForNode(transformNode);
1126
var
table = dstBuilder.GetLatestStateTableForNode(select2);
1161
var
table = dstBuilder.GetLatestStateTableForNode(select2);
1196
var
table = dstBuilder.GetLatestStateTableForNode(select2);
1231
var
table = dstBuilder.GetLatestStateTableForNode(select2);
1267
var
table = dstBuilder.GetLatestStateTableForNode(select2);
1302
var
table = dstBuilder.GetLatestStateTableForNode(select2);