RFR 8155794 Move Objects.checkIndex BiFunction accepting methods to an internal package

Remi Forax forax at univ-mlv.fr
Wed May 4 06:58:13 UTC 2016


----- Mail original -----
> De: "Paul Sandoz" <paul.sandoz at oracle.com>
> Cc: "hotspot-dev developers" <hotspot-dev at openjdk.java.net>, "Core-Libs-Dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Mardi 3 Mai 2016 22:03:12
> Objet: Re: RFR 8155794 Move Objects.checkIndex BiFunction accepting methods	to	an internal package
> 
> 
> > On 3 May 2016, at 07:05, Remi Forax <forax at univ-mlv.fr> wrote:
> > 
> > Looks good to me.
> > minor nitpick, neither checkFromToIndex() nor checkFromIndexSize() are
> > instrinsic (now !) but i think they also should be annotated with
> > @ForceInline in j.u.Objects to avoid the code to be asymmetric or weird if
> > one of these methods is intrinsinfied later.
> > 
> 
> I was tempted, but for the moment i am inclined to leave as is and revisit
> if/when necessary. Trying to be conservative when using those annotations.

Ok,
in fact i wonder if @ForceInline on checkIndex is even useful because the VM considers the implementation as trivial, so it will be routinely inlined.

> 
> Thanks,
> Paul.
> 

cheers,
Rémi


More information about the hotspot-dev mailing list