3 instantiations of TableEntry
Microsoft.CodeAnalysis (3)
SourceGeneration\Nodes\NodeStateTable.cs (3)
638return new TableEntry(_items, s_allCachedEntries, anyRemoved: false); 654public TableEntry AsRemovedDueToInputRemoval() => new(_items, s_allRemovedDueToInputRemoval, anyRemoved: true); 767return new TableEntry(_items.ToOneOrManyAndFree(), _states?.ToImmutableAndFree() ?? GetSingleArray(_currentState.Value), anyRemoved: _anyRemoved);
31 references to TableEntry
Microsoft.CodeAnalysis (30)
SourceGeneration\Nodes\NodeStateTable.cs (29)
63internal static NodeStateTable<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<TableEntry>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true, isCached: false); 65private readonly ImmutableArray<TableEntry> _states; 67private NodeStateTable(ImmutableArray<TableEntry> states, ImmutableArray<IncrementalGeneratorRunStep> steps, bool hasTrackedSteps, bool isCached) 99private TableEntry _inputEntry; 160var compacted = ArrayBuilder<TableEntry>.GetInstance(nonRemovedCount); 161foreach (var entry in _states) 203foreach (var state in _states) 228private readonly ArrayBuilder<TableEntry> _states; 256_states = ArrayBuilder<TableEntry>.GetInstance(tableCapacity ?? previous.GetTotalEntryItemCount()); 270if (!TryGetPreviousEntry(out var previousEntry)) 278var previousEntries = previousEntry.AsRemovedDueToInputRemoval(); 298if (!TryGetPreviousEntry(out var previousEntries)) 311internal bool TryUseCachedEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, out TableEntry entry) 325if (!TryGetPreviousEntry(out var previousEntry)) 353if (!TryGetPreviousEntry(out var previousEntry)) 376var builder = previousEntry.Count == outputs.Length ? null : new TableEntry.Builder(capacity: totalBuilderItems); 400builder = new TableEntry.Builder(capacity: totalBuilderItems); 436public bool TryModifyEntries(ImmutableArray<T> outputs, IEqualityComparer<T> comparer, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState, out TableEntry entry) 455public TableEntry AddEntries(ImmutableArray<T> values, EntryState state, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState) 457var tableEntry = new TableEntry(OneOrMany.Create(values), state); 464private bool TryGetPreviousEntry(out TableEntry previousEntry) 483TableEntry outputInfo = _states[^1]; 537ImmutableArray<TableEntry> finalStates; 605public bool Matches(TableEntry entry, IEqualityComparer<T> equalityComparer) 634public TableEntry AsCached() 654public TableEntry AsRemovedDueToInputRemoval() => new(_items, s_allRemovedDueToInputRemoval, anyRemoved: true); 670private readonly TableEntry _entry; 673public Enumerator(TableEntry tableEntry) 759public TableEntry ToImmutableAndFree()
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
83if (state != EntryState.Cached || !_filterTable.TryUseCachedEntries(TimeSpan.Zero, noInputStepsStepInfo, out NodeStateTable<SyntaxNode>.TableEntry entry))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\StateTableTests.cs (1)
86builder.TryUseCachedEntries(TimeSpan.Zero, default, out var cachedEntries); // ((2, EntryState.Cached), (3, EntryState.Cached))