On Thu, 16 Feb 2023 00:36:03 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

> So... my understanding is that a c2i adapter is used when a callee is
> interpreted, so its `from_compiled_entry` points to the c2i adapter. A
> compiled caller calls the `from_compiled_entry`, so it ends up going through
> the `c2i` adapter of an interpreted callee. However, for method handle
> linkers, the `from_compiled_entry` never points to a c2i adapter, but to the
> MH linker compiler entry generated in `gen_special_dispatch` in e.g
> `sharedRuntime_x86_64`. So, in other words, the 3. and 4. scenarios above are
> not possible, AFAICS.

I see. Thanks! That's what I've been missing. It's implemented in 
`SystemDictionary::find_method_handle_intrinsic()` I think.

I agree that it will be ok to modify r13 as you suggested. Maybe explaining why 
we never reach here coming from a c2i adapter: because native wrappers are 
generated eagerly in `SystemDictionary::find_method_handle_intrinsic()` unless 
-Xint is given but then the caller cannot be compiled.

-------------

PR: https://git.openjdk.org/jdk/pull/12535

Reply via email to