Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ internal sealed class AsciiByteSearchValues<TUniqueLowNibble> : SearchValues<byt

public AsciiByteSearchValues(ReadOnlySpan<byte> values)
{
// Despite the name being Ascii, this type may be used with non-ASCII values on ARM.
// See IndexOfAnyAsciiSearcher.CanUseUniqueLowNibbleSearch.
Debug.Assert(Ascii.IsValid(values) || (AdvSimd.IsSupported && TUniqueLowNibble.Value));
// Despite the name being Ascii, this type may be used with non-ASCII values on ARM or WASM.
// See comments in IndexOfAnyAsciiSearcher.CanUseUniqueLowNibbleSearch.
Debug.Assert(Ascii.IsValid(values) || (TUniqueLowNibble.Value && (AdvSimd.IsSupported || PackedSimd.IsSupported)));

if (TUniqueLowNibble.Value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ internal sealed class AsciiCharSearchValues<TOptimizations, TUniqueLowNibble> :

public AsciiCharSearchValues(ReadOnlySpan<char> values)
{
// Despite the name being Ascii, this type may be used with non-ASCII values on ARM.
// See IndexOfAnyAsciiSearcher.CanUseUniqueLowNibbleSearch.
Debug.Assert(Ascii.IsValid(values) || (AdvSimd.IsSupported && TUniqueLowNibble.Value));
// Despite the name being Ascii, this type may be used with non-ASCII values on ARM or WASM.
// See comments in IndexOfAnyAsciiSearcher.CanUseUniqueLowNibbleSearch.
Debug.Assert(Ascii.IsValid(values) || (TUniqueLowNibble.Value && (AdvSimd.IsSupported || PackedSimd.IsSupported)));
Debug.Assert(!values.ContainsAnyInRange((char)byte.MaxValue, char.MaxValue));

if (TUniqueLowNibble.Value)
{
Expand Down
Loading