[jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling...
commit8446996cabd9fa0fbea802d6098e19df91ee4053
authorZoltan Varga <vargaz@gmail.com>
Sat, 23 May 2020 04:17:50 +0000 (23 00:17 -0400)
committerGitHub <noreply@github.com>
Sat, 23 May 2020 04:17:50 +0000 (23 00:17 -0400)
tree7b1dc563af52bf1313955511ac1c436270523a6e
parent8f0fbfcd95ed2642fb6f2087a39218b7803fe5f5
[jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method. (#19809)

* [jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method.

Fixes https://github.com/dotnet/runtime/issues/34379.

* [runtime] Add some caching to mono_aot_get_unbox_trampoline (). Register unwind info for trampolines.

* Add a 'method' field to MonoTrampInfo to be used by unbox trampolines.

* Refactor delegate initialization code.

Also handle unbox trampolines during the addr->method lookup.

* Merge mono_delegate_ctor () and mono_delegate_ctor_with_method ().
* Move the actual logic to mini_init_delegate ().
* Remove callbacks.create_jump_trampoline, its not used any more.

* Fix the build.

* Remove an interpreter workaround.

* Avoid leaking the amodule->unbox_tramp_per_method array.
12 files changed:
mono/metadata/class-internals.h
mono/metadata/icall.c
mono/metadata/marshal.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/mini/aot-runtime.c
mono/mini/interp/interp.c
mono/mini/jit-icalls.c
mono/mini/mini-arm64.c
mono/mini/mini-runtime.c
mono/mini/mini-wasm.c
mono/mini/mini.h