remove useless node from source gen pipeline. add source gen logic
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user