Hi, This is cool but made me think again about some things I have already asked on this group some time ago.
Does it mean that now with 7u2 the chain invokeExact() -> dynamicInvoker -> MutableCallSite -> SwitchPoint -> constant(x) will be optimistically inlined (until deoptimized for some reason)? Other thing... Is there any real, technical reason why SwitchPoint left branch is called fast and right - slow? If SwitchPoint stays invalidated for a long time will it also get inlined? In other words can I treat use them the other way? First handle for computing the value (slow), second - to MutableCallSite's dynamicInvoker, which in turn points to a now constant value. I'm again thinking about possible optimizations for LambdaVM's thunks [1]. Great thing about jsr292 is that a seasoned hacker of languages runtimes can just cross his fingers and wait until things work better... ;-) Thanks, Szymon [1] http://wiki.brianweb.net/LambdaVM/Implementation On Sat, Dec 17, 2011 at 7:33 PM, Rémi Forax <fo...@univ-mlv.fr> 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<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 > > -- > You received this message because you are subscribed to the Google Groups > "JVM Languages" group. > To post to this group, send email to jvm-langua...@googlegroups.com**. > To unsubscribe from this group, send email to jvm-languages+unsubscribe@** > googlegroups.com <jvm-languages%2bunsubscr...@googlegroups.com>. > For more options, visit this group at http://groups.google.com/** > group/jvm-languages?hl=en<http://groups.google.com/group/jvm-languages?hl=en> > . > >
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev