You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mono] Optimize generic sharing for generic methods. (#64129)
* [mono] Optimize generic sharing for generic methods.
Previously, rgctx entries where stored either in the class rgctx
or the method rgctx in linked structures, and accessed using
rgctx trampolines (for non-llvmonly configuration), or
inline code and fallback C code (for llvmonly configuration).
However, if a method has an mrgctx parameter, all the rgctx entries
can be stored as an array in the mrgctx and accessed using a simple
load.
One complication is that the mrgctx might need to be allocated before
the method is compiled/loaded, so the rgctx entries need to be stored
in a separate array, and the array needs to be initialized on
demand.
* Add an 'entries' field to MonoMethodRuntimeGenericContext which stores
the rgctx entries.
* Add a MonoGSharedMethodInfo structure which stores the information
needed to initialize a MonoMethodRuntimeGenericContext, i.e. the
number of rgctx entries and their contents.
* Add a MONO_PATCH_INFO_GSHARED_METHOD_INFO patch type to refer
to the previous structure.
* Add a mini_init_method_rgctx () JIT icall, which initializes
an mrgctx if needed and generate code in the prolog of gshared methods
to call it.
* [mono] Pass an mrgctx to static/valuetype gshared methods.
Previously, these methods were passed a vtable. Passing the mrgctx
instead simplifies some runtime code and allows smaller/faster access to
rgctx entries.
* Add rgctx trampolines in get_ftnptr_for_method ().
* [mono][wasm] Avoid AOTing Microsoft.CodeAnalysis.dll as well.
Copy file name to clipboardExpand all lines: src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj
0 commit comments