Are java.lang classes better served by the JVM?
Mark Roos
mroos at roos.com
Sun Sep 30 18:00:50 PDT 2012
Charles made an interesting comment
Now what we need is a way to inject new intrinsics into the JVM, so I
can make an asm version of something and tell hotspot "no no, use
this, not the JVM bytecode" :)
Of course unless one wants to take on the efforts of Zero Assembler or
Grail and write one's own JIT
it will be a while before we see this. But it does bring to mind a
comment John Rose made at the
2010 JVMLS about how it would be cool if a method handle could refer to
some native code. It seems
like this would get at least some of what you want.
It seems like this is already possible ( I have not tried it ) as method
handles can wrapper a native method. So what us dynamic
folks need is a way to generate the native code on the fly. And of course
it would be nice if JNI calls were inlined. I see an
example in LLVM where the JIT facet of LLVM is used to generate single C
functions. The seems to be what we need. On the
fly code generation and then using method handles to substitute them at
runtime. Of course JNI could be slow.
And thoughts of if this would work? And any reading suggestions to get a
better handle on the details?
thanks
mark
The LLVM atricle is here http://llvm.org/docs/tutorial/LangImpl4.html
And some research on inlining JNI
http://static.usenix.org/events/vee05/full_papers/p121-stepanian.pdf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20120930/5222443d/attachment.html
More information about the mlvm-dev
mailing list