Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/Ramstack.Parsing/Parser.Repeat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public override bool TryParse(ref ParseContext context, [NotNullWhen(true)] out
// In other words, the check would happen anyway, but by placing it here explicitly,
// we eliminate the need for exception code inside Slice itself.
//
// Even though logically (uint)index < (uint)s.Length implies (uint)index <= (uint)s.Length,
// Even though logically (uint)index < (uint)s.Length implies (uint)index + 1 <= (uint)s.Length,
// the JIT cannot currently prove this identity and therefore cannot optimize away
// the redundant check in Slice.

Expand Down Expand Up @@ -563,7 +563,7 @@ public override bool TryParse(ref ParseContext context, out Unit value)
// In other words, the check would happen anyway, but by placing it here explicitly,
// we eliminate the need for exception code inside Slice itself.
//
// Even though logically (uint)index < (uint)s.Length implies (uint)index <= (uint)s.Length,
// Even though logically (uint)index < (uint)s.Length implies (uint)index + 1 <= (uint)s.Length,
// the JIT cannot currently prove this identity and therefore cannot optimize away
// the redundant check in Slice.

Expand Down