[mono] Clean up the delegate ctor code. (#83288)
authorZoltan Varga <vargaz@gmail.com>
Mon, 13 Mar 2023 13:43:33 +0000 (09:43 -0400)
committerGitHub <noreply@github.com>
Mon, 13 Mar 2023 13:43:33 +0000 (09:43 -0400)
commitbbc7e067fba1aa7d0c1bd6ac630340816522f0d3
treea5f8aebe5b05d94079bab1944af8e8f69d2bf633
parent02a7695eaf2b28d3d561b1dc4118ff62232e50e7
[mono] Clean up the delegate ctor code. (#83288)

* [mono] Clean up the delegate ctor code.

* Merge the virtual and non-virtual cases.
* Reorder the code in handle_delegate_ctor () to reduce the llvm_only conditionals.
* Name variables etc. delegate info instead of delegate trampoline.
* Avoid setting the del->is_virtual field if its FALSE.

* Remove some code which is already done by mono_resolve_patch_target_ext ().

* Remove some dead code.

* Unify the virtual/non-virtual case for llvmonly as well.
12 files changed:
src/mono/mono/mini/aot-compiler.c
src/mono/mono/mini/aot-runtime.c
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/llvmonly-runtime.c
src/mono/mono/mini/llvmonly-runtime.h
src/mono/mono/mini/method-to-ir.c
src/mono/mono/mini/mini-generic-sharing.c
src/mono/mono/mini/mini-runtime.c
src/mono/mono/mini/mini-runtime.h
src/mono/mono/mini/mini-trampolines.c
src/mono/mono/mini/mini.h
src/mono/mono/mini/patch-info.h