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