On Thu, Aug 6, 2009 at 9:35 AM, Rémi Forax<[email protected]> wrote:
> You should try to cache the method handle in the DynamicMethod
> to reuse the same MH for several call sites.
Yeah, good call. I'll have to store it at Object, though, since we
want a single codebase to work for Java 5+. But caching it shouldn't
be hard.
> Speaking for what I am knowing, i.e
> without a special wildcard rule for inlining,
> It's working for bi-morphic call but after that
> local vtable (or selector table) implemented using table or
> lookup switch are more efficient.
>
> Something like:
> let receiverClass = receiver.getClass();
> switch(receiverClass.hashCode()) {
> case 0x1345678:
> return ...
> case 0x678456:
> // here there is a collision, very rare in practice, fallback to
> if..else
> if (receiverClass == String.class) {
>
> } else {
>
> }
> ...
> }
Yes, I'm sure there would be a failover point. I wonder how one could
do a switch using only method handles...perhaps there's a need for
another handle type that takes a table of values => target handles and
another handle to retrieve the switch argument?
> I wonder if tiered compilation is still an active project
> since Steve Goldman passed away.
> I know that someone new (I don't remember who)
> was in charge to this project but I haven't seen
> any news since.
I had heard it was still progressing, but very slowly. I hope new
resources appear soon to help move it along :(
- Charlie
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev