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. Rémi _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev