On Mon, May 23, 2011 at 7:41 PM, John Rose <john.r.r...@oracle.com> wrote: >> I'm still unclear why you couldn't write your own variant of guardWithTest >> and have it work but my knowledge of what's really allowed is somewhat >> limited. > > Those snippets will inline (I think), but at some point Charlie will want to > fetch a bit of constant stuff out of an instance variable. That will look > non-constant to the optimizer, even if the instance variable is final and the > enclosing object is a constant reference. We made sure this happens for > java.lang.invoke classes, but we haven't extended it yet to user code, in > part because it would have its own bug tail to work through.
That's what I figured. See the diff I just posted that basically does GWT by hand. This also plays into the pre/post logic discussion too...ideally there would be a way to indicate to the JVM that my hand-written Java code should be specialized on a per-callsite or per-MH-chain basis, so I could reuse the same code many places without it going all megamorphic on me. You say "haven't extended it yet to user code"...which gives me hope for 1.7.0_1 potentially introducing it :) If I can get past this invokeExact exception, I'll let you know how inlining looks in a polymorphic case. - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev