Rémi Forax wrote:
> I've written a blog entry about how to write a static volatile final
> variable, i.e. a variable which is considered as constant by the
> compiler (the JIT) and if the variable changes, the JITed code is
> deoptimized and jump back in interpreter mode to eventually optimize it
> again later.
> 
> http://weblogs.java.net/blog/forax/archive/2011/12/17/jsr-292-goodness-
> almost-static-final-field
> 
> The code is a little bit more convoluted than it should because there is
> no invokedynamic in Java but you can emulate it.

This nicely illustrates the challenge that JSR 292 poses for me. On IKVM.NET 
the best solution for an almost static final field, is simply a normal (or 
volatile) field and so I would really need to be able to detect this pattern 
and strip it all out, but because JSR 292 is so powerful (and general) it is 
hard to detect these patterns. So my guess is that when I start looking 
seriously at JSR 292 perf, I will have to cheat and simply look at the specific 
patterns that (e.g.) JRuby uses and support them.

BTW, I assume you'll trust I know the answer to your two casts question, so 
please remind me of the free beer at FOSDEM :-)

Regards,
Jeroen

-- 
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to