RFC (S) 8140483: Atomic*FieldUpdaters final fields should be trusted
vitalyd at gmail.com
Tue Oct 27 00:13:00 UTC 2015
Yes, I think so because passing `this` is the common pattern for these
As for your actual changes, you sure just checking package and holder not
being serializable isn't too broad a brush? It makes for shorter code, but
may inadvertently include something in the future that it shouldn't and
cause hard to catch issues.
sent from my phone
On Oct 26, 2015 8:04 PM, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>
> On 10/27/2015 02:52 AM, Vitaly Davidovich wrote:
> > In this particular case, A*FU is doing obj.getClass() == tclass as a
> > cheaper check than what fullCheck() does, which is
> > tclass.isInstance(obj). However, theoretically speaking, if A*FU op is
> > inlined into an instance method where `this` is passed, it should be
> > able to determine at JIT time whether `this` is tclass or subtype of
> > it. Then that whole type check could be removed.
> Yes, I get that. It may be profitable to check Class.isInstance, instead
> of the exact match, so that subclasses are also acceptable. And it
> indeed does help to eliminate the type check.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev