Removed JIT (uint) cast workaround to elide bound-checks in CoreLib (#67448)
* Removed (uint) cast workaround in CoreLib, annotated missing places with TODOs * Fixed the bug I introduced in TimeSpanParse.TimeSpanTokenizer * Use uint-cast on both sided for clarity Cf. https://github.com/dotnet/runtime/pull/67448#discussion_r841082992 * Use uint-division in BitHelper as the JIT can produce more efficient code Cf. https://github.com/dotnet/runtime/pull/67448#discussion_r841239729 * Don't have struct local in ValueStringBuilder due to hitting JIT optimization limits Cf. https://github.com/dotnet/runtime/pull/67448#discussion_r841129465 * BitHelper with uint division and without Math.DivRem for even better codegen AggressiveInlining isn't needed anymore, also the JIT recognizes the _span field, so no local Span is needed here. * BitHelper needs local Span due to regression in jit-diff otherwise * Added Debug.Asserts to BitHelper's method that take bitPosition * BitHelper: comment for workaround to tracking issue
Showing
想要评论请 注册 或 登录