-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[marshal] Cleanup dead ifdefs #78435
Merged
lambdageek
merged 6 commits into
dotnet:main
from
lambdageek:remove-marshal-unused-code
Nov 16, 2022
Merged
[marshal] Cleanup dead ifdefs #78435
lambdageek
merged 6 commits into
dotnet:main
from
lambdageek:remove-marshal-unused-code
Nov 16, 2022
Conversation
This file contains 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
This was a previous attempt at supporting only blittlable marshaling. It is not used on any platform. The current approach is to build a "lightweight" version marshaling that only works with blittable types, and a separate runtime component for legacy marshaling
It is not used anymore since ilgen is always in the runtime
@naricc first stab at cleaning up now that the component is finally in |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
These were used with mono/mono dllmaps to provide common kernel32 functions on non-Windows. Keep them around since they're marked MONO_API, but don't use them in the runtime
Instead of doing an indirect call through `get_marshal_cb()`, just call the relevant `_ilgen` functions directly. They're all implementation details of the legacy marshaller.
vargaz
approved these changes
Nov 16, 2022
1cc3c47
to
ba31afc
Compare
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
SamMonoRT
approved these changes
Nov 16, 2022
Fixes #78422 |
tvOS failures are unrelated |
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.
The
DISABLE_NONBLITTABLE
define was a previous attempt at partitioning the marshaling into a simple version that just supports blittable types and the full legacy marshaller. It was never used in production.The
ENABLE_ILGEN
was used previously in configurations where runtime codegen was not available to save some space by excluding support for emitting IL at runtime (needed for marshaling, fast managed allocators in sgen, etc). It also used to emit the ilgen support code into a separate static library that could optionallly be linked into the runtime, and enabled with an appropriate API call (mono_marshal_ilgen_init
). This define is now on by default and the API function is a no-op.Mark a collection of
mono_win32_compat_
functions withMONO_RT_EXTERNAL_ONLY
and move them toexternal-only.c
(these were used in mono/mono dllmap support to provide some common kernel32 functions on non-Windows)Remove
MonoMarshalILgenCallbacks
inmarshal-ilgen.c
- just do direct calls to the_ilgen
helper functionsFixes #78422