http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/5d13c9b094c4/src/share/vm/opto/library_call.cpp#l5629

C2 does inline it but intentionally forbids commoning out reads of
Reference.get.  However, this needs a real fix not a hack.

sent from my phone
On Oct 26, 2015 3:22 PM, "Justin Sampson" <jsamp...@guidewire.com> wrote:

> Alex Otenko wrote:
>
> > Wouldn't it be possible to add a test that will always be false?
> >
> > eg
> > [...]
> > if (get() != referent) {
> > [...]
> >
> > The point being that referent would need to stay alive due to
> > Java semantics to align with get() and queue assignment.
>
> Couldn't the compiler just inline get() as this.referent, see that
> this.referent was just set to referent, and simplify this.referent
> != referent to false?
>
> Cheers,
> Justin
>
> _______________________________________________
> Concurrency-interest mailing list
> concurrency-inter...@cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>

Reply via email to