[WIP] [WASM] Ongoing AOT work. (#11728)
* [wasm] Add the declaring types assembly name to the mangled name for instances during dedup. Fixes failures when two assemblies have a generic type with the same name.
* [runtime] Rename MONO_WRAPPER_UNKNOWN to MONO_WRAPPER_OTHER.
* [aot] Make the aot name mangling a little denser.
* [wasm] Don't emulate lojg shifts/multiplications.
* [runtime] Fix warnings.
* [aot] Small cleanups to the dedup code:
* Fix the dedup logging in llvmonly mode.
* Split mono_compile_assembly () into 2 functions, the second one doing the emission.
* Split the setting of cfg->skip from emit_code ().
* Skip more code and some logging for the other assemblies in the dedup-include case.
* [jit] Do the conversion to JIT intrinsics somewhat earlier.
This is needed to avoid emitting the code for passing the mrgctx etc. for
generic intrinsics like RuntimeHelpers.IsReferenceOrContainsReferences ().
* [aot] Implement sharing of gsharedvt wrappers passing/receiving
valuetype arguments based on their layout.
This is done by replacing valuetypes with instances of the
newly added Mono.ValueTuple generic structures inside the
wrappers. For example, for the type:
struct FooStruct {
int i; object o;
}
and the gsharedvt out wrapper:
gsharedvt_out (ref FooStruct v);
This will be replaced by:
gsharedvt_out (ref ValueTuple<int, object> v);
The two structures have the same layout so as far as the JIT is
concerned, they are identical.
* [aot] Share native int/native uint with int32/uint32 in gsharedvt wrappers on 32 bit platforms.
* [bcl] Make the Mono.ValueType structs internal.
15 files changed: