RFR (S): 8079091: Remove dictionary NULL check on common path of BlockFreeList methods
Kim Barrett
kim.barrett at oracle.com
Thu Apr 30 19:15:53 UTC 2015
On Apr 30, 2015, at 3:37 AM, Jungwoo Ha <jwha at google.com> wrote:
>
> My original change (not embedding CHeapObj): http://cr.openjdk.java.net/~jwha/8079091/webrev.00/
> Jon's suggestion (from hotspot-gc-dev): http://cr.openjdk.java.net/~jwha/8079091/webrev.02/
>
> Please take a look on .02.
Sorry, but version .02 gets a No from me.
Casting away const is almost always an indication that something is
wrong. Very nearly the only valid excuse for it is when dealing with
an external library that is not itself const-correct.
If you *really* want to keep the accessor function, then there
probably needs to be two versions of it, one const and returning
const*, and the other non-const and (probably) returning non-const*.
But I really don't think the accessor function(s) are helpful here.
(The accessor function would have been helpful previously if the lazy
allocation had been encapsulated within it, but it didn't do that.)
More information about the hotspot-runtime-dev
mailing list