RFC: Refactoring SystemABI

Jorn Vernee jbvernee at xs4all.nl
Fri Nov 23 15:47:05 UTC 2018


Maurizio Cimadamore schreef op 2018-11-23 16:33:
> On 23/11/2018 14:14, Jorn Vernee wrote:
>> It calls the prefixed MethodHandle instead.
> 
> Right - that is the part I'm unsure about; JNI API do not support this
> and I don't know if there exist another way to do it.
> 
> In any case, I don't think this is hardly a blocker - given that we
> can easily workaround with some ifdefs?

Yes, I don't think it's much of a problem to work around right now, but 
I thought it was good to mention it.

Instead of using ifdefs, for now we could also just have the 
UniversalUpcallHandler in the common ABI code, since I was planning to 
do that any ways. So UniversalUpcallHandler would not be moved to the 
SysV impl package, but instead be put in the `abi` package, together 
with UpcallHandler probably.

Maybe down the road we could have some macro assembler api that takes a 
MethodHandle and generates a call equivalent to invokeExtact for it. I 
did find generate_method_handle_dispatch [1] in the VM code, but I think 
that is an intrinsic, and not something we could use out of the box.

Jorn

[1] : 
http://hg.openjdk.java.net/panama/dev/file/e73c69d8f5b6/src/hotspot/cpu/x86/methodHandles_x86.cpp#l293


More information about the panama-dev mailing list