6 instantiations of TableEntry
Microsoft.CodeAnalysis (6)
SourceGeneration\Nodes\NodeStateTable.cs (6)
258
_states.Add(new
TableEntry
(OneOrMany.Create(chosen), state));
359
_states.Add(new
TableEntry
(OneOrMany.Create(value), state));
365
var tableEntry = new
TableEntry
(OneOrMany.Create(values), state);
518
public TableEntry AsCached() =>
new
(_items, s_allCachedEntries);
520
public TableEntry AsRemoved() =>
new
(_items, s_allRemovedEntries);
643
return new
TableEntry
(items, _states?.ToImmutableAndFree() ?? GetSingleArray(_currentState.Value));
26 references to TableEntry
Microsoft.CodeAnalysis (25)
SourceGeneration\Nodes\NodeStateTable.cs (24)
63
internal static NodeStateTable<T> Empty { get; } = new NodeStateTable<T>(ImmutableArray<
TableEntry
>.Empty, ImmutableArray<IncrementalGeneratorRunStep>.Empty, hasTrackedSteps: true);
65
private readonly ImmutableArray<
TableEntry
> _states;
67
private NodeStateTable(ImmutableArray<
TableEntry
> states, ImmutableArray<IncrementalGeneratorRunStep> steps, bool hasTrackedSteps)
97
TableEntry
inputEntry = _states[i];
113
var compacted = ArrayBuilder<
TableEntry
>.GetInstance(nonRemovedCount);
114
foreach (
var
entry in _states)
155
private readonly ArrayBuilder<
TableEntry
> _states;
181
_states = ArrayBuilder<
TableEntry
>.GetInstance(tableCapacity ?? previous.GetTotalEntryItemCount());
202
var
previousEntries = _previous._states[_states.Count].AsRemoved();
228
var
previousEntries = _previous._states[_states.Count];
236
internal bool TryUseCachedEntries(TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, out
TableEntry
entry)
277
var
previousEntry = _previous._states[_states.Count];
297
var builder = previousEntry.Count == outputs.Length ? null : new
TableEntry
.Builder(capacity: totalBuilderItems);
321
builder = new
TableEntry
.Builder(capacity: totalBuilderItems);
363
public
TableEntry
AddEntries(ImmutableArray<T> values, EntryState state, TimeSpan elapsedTime, ImmutableArray<(IncrementalGeneratorRunStep InputStep, int OutputIndex)> stepInputs, EntryState overallInputState)
365
var
tableEntry = new TableEntry(OneOrMany.Create(values), state);
379
TableEntry
outputInfo = _states[^1];
433
ImmutableArray<
TableEntry
> finalStates;
489
public bool Matches(
TableEntry
entry, IEqualityComparer<T> equalityComparer)
518
public
TableEntry
AsCached() => new(_items, s_allCachedEntries);
520
public
TableEntry
AsRemoved() => new(_items, s_allRemovedEntries);
536
private readonly
TableEntry
_entry;
539
public Enumerator(
TableEntry
tableEntry)
623
public
TableEntry
ToImmutableAndFree()
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
83
if (state != EntryState.Cached || !_filterTable.TryUseCachedEntries(TimeSpan.Zero, noInputStepsStepInfo, out NodeStateTable<SyntaxNode>.
TableEntry
entry))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\StateTableTests.cs (1)
86
builder.TryUseCachedEntries(TimeSpan.Zero, default, out
var
cachedEntries); // ((2, EntryState.Cached), (3, EntryState.Cached))