remove useless node from source gen pipeline. add source gen logic

This commit is contained in:
Youmu Liu
2026-08-21 18:31:31 +08:00
parent 968a6afe1a
commit f0b6a4038e
15 changed files with 219 additions and 334 deletions
@@ -124,24 +124,6 @@ namespace StgSharp.Collections
_index += span.Length;
}
public void PushRange(
SpanAction<T, int> filling,
int count
)
{
if (count == 0) {
return;
}
if (_index + count > _values.Length) {
throw new InvalidOperationException("Not enough space in the stack to push the entire span.");
}
if (filling is not null)
{
filling(_values.AsSpan()[_index..(_index + count)], count);
_index += count;
}
}
public bool TryPop(
out T value
)
@@ -157,6 +139,18 @@ namespace StgSharp.Collections
return true;
}
internal void FillRange(
SpanAction<T, nuint> filling,
nuint buffer
)
{
if (filling is not null)
{
filling(_values.AsSpan()[_index..], buffer);
_index = _values.Length;
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Span<T> GetValueLayout()
{