Remove some unnecessary slicing from generated Regex code (#61701)
authorStephen Toub <stoub@microsoft.com>
Wed, 17 Nov 2021 13:22:14 +0000 (08:22 -0500)
committerGitHub <noreply@github.com>
Wed, 17 Nov 2021 13:22:14 +0000 (08:22 -0500)
commit83661ff53d0a43e354d839a3efeede3c089284c8
tree5fa251287d77aea12ae0e6573199f47976a0b66f
parent44d28bf5b6c8b448ac4f19638b90cdbdba6be5bc
Remove some unnecessary slicing from generated Regex code (#61701)

* Remove some unnecessary slicing from generated Regex code

When we're outputting code to match a "multi" (a sequence of multiple characters), we're currently issuing a Slice for the known tracked offset even if that offset is 0.  We can skip that nop.

* Address PR feedback
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.Emitter.cs