Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

ThrowHelper proposal draft #1422

Closed
wants to merge 5 commits into from

Conversation

Mrnikbobjeff
Copy link
Contributor

Description of Change

Draft for ThrowHelper, as our current Exception throwing policy may result in worse code generation and in code bloat.

Behavioral Changes

More detailed Exceptions in SecureStorage.ios, but fully backward compatible as we only throw System.Exception.
PlatformNotSupportedExceptions were converted to NotImplementedExceptions as the type is not owned by us and has docs which make no sense as seen in linked issues

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)
    @mattleibow

@Mrnikbobjeff
Copy link
Contributor Author

So, it appears that the binary size did increase slightly. This is mostly due to the additional metadata for the new methods. The compiler is smart enough to detect throwhelper methods and not inline them as well as generate slightly better code for retuning of these fake throwhelper methods as you can see here. It is still true that the inlineability of these methods increases manyfold as method size goes down incredibly in some methods which do not require building an exception frame.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant