Make CalendarData more linker friendly.#14825
Merged
marek-safar merged 1 commit intomono:masterfrom Jun 6, 2019
Merged
Conversation
See mono/corefx#298 for a description of the technique that we're using here to make it more linker friendly.
baulig
pushed a commit
to baulig/linker
that referenced
this pull request
Jun 5, 2019
This requires mono/corefx#298 and mono/mono#14825. We are using the same techinique as previously employed in dotnet#590 to dynamically remove the `System.Reflection.Emit` code. Since the linker does not currently support dead code elimination, it cannot break down any conditionals inside method bodies. One trick that we use to work around this is to move those conditional pieces into separate methods; then we can give the linker a list of those methods and tell it to replace their bodies with exceptions. After this has been done in the BCL, we need to explicitly tell the linker to turn those method bodies into stubs when `--exclude-feature globalization`. Ideally, we would want to use `MethodAction.ConvertToStub` instead of `ConvertToThrow` here, but we'd have to extend the code rewriter first to support methods with arbitrary return types and parameters.
Contributor
Author
|
We need to bump CoreFX after it's PR has landed. |
marek-safar
pushed a commit
to dotnet/linker
that referenced
this pull request
Jun 6, 2019
This requires mono/corefx#298 and mono/mono#14825. We are using the same techinique as previously employed in #590 to dynamically remove the `System.Reflection.Emit` code. Since the linker does not currently support dead code elimination, it cannot break down any conditionals inside method bodies. One trick that we use to work around this is to move those conditional pieces into separate methods; then we can give the linker a list of those methods and tell it to replace their bodies with exceptions. After this has been done in the BCL, we need to explicitly tell the linker to turn those method bodies into stubs when `--exclude-feature globalization`. Ideally, we would want to use `MethodAction.ConvertToStub` instead of `ConvertToThrow` here, but we'd have to extend the code rewriter first to support methods with arbitrary return types and parameters.
baulig
pushed a commit
to baulig/linker
that referenced
this pull request
Jun 6, 2019
This requires mono/corefx#298 and mono/mono#14825. We are using the same techinique as previously employed in dotnet#590 to dynamically remove the `System.Reflection.Emit` code. Since the linker does not currently support dead code elimination, it cannot break down any conditionals inside method bodies. One trick that we use to work around this is to move those conditional pieces into separate methods; then we can give the linker a list of those methods and tell it to replace their bodies with exceptions. After this has been done in the BCL, we need to explicitly tell the linker to turn those method bodies into stubs when `--exclude-feature globalization`. Ideally, we would want to use `MethodAction.ConvertToStub` instead of `ConvertToThrow` here, but we'd have to extend the code rewriter first to support methods with arbitrary return types and parameters. (cherry picked from commit 3eca6ad)
tkapin
pushed a commit
to tkapin/runtime
that referenced
this pull request
Jan 31, 2023
This requires mono/corefx#298 and mono/mono#14825. We are using the same techinique as previously employed in dotnet/linker#590 to dynamically remove the `System.Reflection.Emit` code. Since the linker does not currently support dead code elimination, it cannot break down any conditionals inside method bodies. One trick that we use to work around this is to move those conditional pieces into separate methods; then we can give the linker a list of those methods and tell it to replace their bodies with exceptions. After this has been done in the BCL, we need to explicitly tell the linker to turn those method bodies into stubs when `--exclude-feature globalization`. Ideally, we would want to use `MethodAction.ConvertToStub` instead of `ConvertToThrow` here, but we'd have to extend the code rewriter first to support methods with arbitrary return types and parameters. Commit migrated from dotnet/linker@3eca6ad
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See mono/corefx#298 for a description of the
technique that we're using here to make it more linker friendly.