Repository navigation
[marshal] Cleanup dead ifdefs - #78435
Merged
Merged
Conversation
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
lambdageek
requested review from
BrzVlad,
SamMonoRT,
marek-safar,
naricc,
thaystg and
vargaz
as code owners
November 16, 2022 01:06
Member
Author
|
@naricc first stab at cleaning up now that the component is finally in |
Member
Author
|
/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
lambdageek
force-pushed
the
remove-marshal-unused-code
branch
from
November 16, 2022 03:01
1cc3c47 to
ba31afc
Compare
Member
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
SamMonoRT
approved these changes
Nov 16, 2022
Member
|
Fixes #78422 |
Member
Author
|
tvOS failures are unrelated |
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.
The
DISABLE_NONBLITTABLEdefine 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_ILGENwas 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_ONLYand move them toexternal-only.c(these were used in mono/mono dllmap support to provide some common kernel32 functions on non-Windows)Remove
MonoMarshalILgenCallbacksinmarshal-ilgen.c- just do direct calls to the_ilgenhelper functionsFixes #78422