Incorporate a throwhelper into Maui.Essentials #22614
Unanswered
Mrnikbobjeff
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
This is a duplicate for a Xamarin Essentials ticket which was favored by @mattleibow in here.
The reasoning stays the same, the JIT compiler recognizes these throw helpers and never inlines them. The calling method may thus have a more favourable structure due to not having the execption creation instructions. This might allow further optimizations which previously were not available.
The Essentials Barmometer class for example mirrors this issues where a ThrowHelper would be beneficial.
Public API Changes
None, if the attribute is introduced to hide the throw helpers from stack traces
Intended Use-Case
Minor improvement mirroring best practices for library code
Beta Was this translation helpful? Give feedback.
All reactions