This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Enable reflection blocking#3685
Merged
MichalStrehovsky merged 2 commits intodotnet:masterfrom May 25, 2017
Merged
Conversation
...or: Substantially reduce our size on disk footprint Reflection blocking is a size on disk optimization that prevents generating native metadata for things that are considered private implementation details of the runtime. Since CoreRT is compiled ahead of time, a lot of things that would be needed by a full VM (method names, custom attributes, etc.) are no longer necessary at runtime. Metadata is strictly only necessary to support reflection at runtime. The policy I'm implementing is to consider everything private in our implementation assemblies to be reflection blocked. What this entails: * Adding support for computing reflection blocked state in the compiler * Tweak to blocking policy to allow us to express blocking state of MethodImpls * Uncomment blocking table mapping table scanning (this broke the PInvoke test for CppCodegen and we needed a workaround) * Opt in private assemblies to reflection blocking
Member
Author
|
Some numbers (sizes in bytes, for x86ret):
|
benpye
reviewed
May 24, 2017
| { | ||
| [AttributeUsage(AttributeTargets.All)] | ||
| internal class __BlockReflectionAttribute : Attribute { } | ||
| } No newline at end of file |
nattress
reviewed
May 24, 2017
| @@ -0,0 +1,13 @@ | |||
| /* | |||
Contributor
There was a problem hiding this comment.
Missing a copyright header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reflection blocking is a size on disk optimization that prevents
generating native metadata for things that are considered
private implementation details of the runtime.
Since CoreRT is compiled ahead of time, a lot of things that
would be needed by a full VM (method names, custom attributes, etc.)
are no longer necessary at runtime. Metadata is strictly only necessary
to support reflection at runtime.
The policy I'm implementing is to consider everything private in our
implementation assemblies to be reflection blocked.
What this entails: