3 instantiations of NodeStateTable
Microsoft.CodeAnalysis (3)
SourceGeneration\Nodes\NodeStateTable.cs (3)
64internal static NodeStateTable<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false); 173return new NodeStateTable<T>(compacted.ToImmutableAndFree(), ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: false, isCached: true); 551return new NodeStateTable<T>(
77 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)
64internal static NodeStateTable<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false); 96private readonly NodeStateTable<T> _stateTable; 103public Enumerator(NodeStateTable<T> stateTable) 150public NodeStateTable<T> AsCached() 187public NodeStateTable<T> CreateCachedTableWithUpdatedSteps<TInput>(NodeStateTable<TInput> inputTable, string? stepName, IEqualityComparer<T>? equalityComparer) 190NodeStateTable<T>.Builder builder = ToBuilder(stepName, stepTrackingEnabled: true, equalityComparer); 230private readonly NodeStateTable<T> _previous; 246NodeStateTable<T> previous, 519public NodeStateTable<T> ToImmutableAndFree() 526return 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;