RFC: Refactoring SystemABI
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri Nov 23 14:02:36 UTC 2018
An exception is Methodhandle::invokeWithArguments, which is not a
@PolymorphicSignature method - but I'd be afraid about the efficiency of
that approach (that requires boxing of arguments into an array).
Maurizio
On 23/11/2018 13:59, Maurizio Cimadamore wrote:
>
> On 23/11/2018 13:51, Maurizio Cimadamore wrote:
>> plus I'm not sure how we can effectively invoke a MH from native code.
>
> Some excerpts from JDK javadocs on MethodHandle::invokeXYZ methods
>
> * When this method is observed via the Core Reflection API,
> * it will appear as a single native method, taking an object
> array and returning an object.
> * If this native method is invoked directly via
> * {@link java.lang.reflect.Method#invoke
> java.lang.reflect.Method.invoke}, via JNI,
> * or indirectly via {@link
> java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect},
> * it will throw an {@code UnsupportedOperationException}.
>
> So, with regular API this cannot be done, although I suspect Hotspot
> gurus might have some internal way to do this (?)
>
> Maurizio
>
More information about the panama-dev
mailing list