Status of Anno Class loader with constant patches?
Rémi Forax
forax at univ-mlv.fr
Tue Dec 28 13:53:22 PST 2010
On 12/28/2010 07:32 PM, Mark Roos wrote:
> Thanks Remi, the extra comments really helped
>
> You also mentioned
> >
> > There is another way to do something similar,
> > you can call invokedynamic, use the bootstrap arguments to send
> > the primitive values composing the object value and when the
> > BSM is called returns a ConstantCallSite with as target a method handle
> > created by MethodHandles.constant().
>
> At first glance this seems like adding a lot of overhead ( a method
> send ) as
> a replacement for a simple ldc bytecode. Are you thinking that
> hotspot will be
> efficient in optimizing this?
We, the JSR292 EG, think that most of the VMs will be able to optimize this.
>
> I like it theoretically, as I don't have to mess with the class
> loader, but will
> the overhead be acceptable?
In fact for hotspot, this kind of constant can be even more optimized
than a static final field containing a non-primitive values which is not
a real constant
(it can be modified by reflection).
>
> happy new year
> mark roos
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20101228/4e3b8d24/attachment.html
More information about the mlvm-dev
mailing list