[pypy-dev] JVM backend - status and future work possibilities?
paul.degrandis at gmail.com
Fri May 13 18:59:47 CEST 2011
On your second question, the default JVM does not support TCO, but you can
trampoline. There is a JVM version (called DiVinci Machine), that is
working to (and can somewhat) support TCO. The DaVinci Machine is where
invokedynamic and invokevirtual came from (approved JSRs are part of JDK7
Languages like Python and Ruby will see noticeable improvements for
invokedynamic, but languages like Clojure will not (since Clojure gets a
strict compilation phase before it gets executed). For this reason, my
intuition is that (like you) I don't think it's useful for the static JIT,
but could be really cool for language hooks thereafter (since the JVM JIT
can optimize invokedynamic and invokevirtual calls).
On Fri, May 13, 2011 at 9:14 AM, Antonio Cuni <anto.cuni at gmail.com> wrote:
> On 12/05/11 06:39, Charles Oliver Nutter wrote:
> > FWIW I would be happy to help out with advice and direction, especially
> if the JVM backend could be rejiggered to take advantage of the new
> invokedynamic bytecode in Java 7. I have been using it for JRuby and have
> been very pleased with it.
> Hello Charles,
> I think that invokedynamic might be very useful for a potential JVM JIT
> backend, but not for the static one, because the RPython code translates
> straightforwardly to the "normal" JVM bytecode.
> About the JIT, I am very interested in hearing about the potential of
> invokedynamic. For example, I think it could be useful for attaching new
> bridges to already compiled loops, without the need to recompile the whole
> loop as the CLI JIT backend does.
> Two questions:
> - how fast/slow is an invokedynamic call compared to a local jump?
> that the JVM is able to inline the target method)
> - are tail calls supported by the JVM, and by invokedynamic in particular?
> pypy-dev mailing list
> pypy-dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pypy-dev