RFR[XS]: 8238272: Eliminate cast_from_oop to narrowOop*

Aleksey Shipilev shade at redhat.com
Fri Jan 31 07:07:18 UTC 2020


On 1/31/20 7:51 AM, Kim Barrett wrote:
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8238272/open.00/

Hm, I am puzzled a bit.

a->obj_at_addr_raw(0) seems to point to the first array element (objArrayOopDesc::base_raw + 0 =
arrayOopDesc::base_raw(T_OBJECT) = cast_from_oop<intptr_t>(as_oop()) + base_offset_in_bytes(type) =
header_size(type) * HeapWordSize). Whereas cast_from_oop<T*>(a) points to the object header.

So start == 0 is really a special case here, do we know why?

> Compared gcc generated code for linux-x64 with and without the change
> for calls with and without a literal 0 start index.

And it was the same, contrary to the idea above?

-- 
Thanks,
-Aleksey



More information about the hotspot-dev mailing list