« Return to Thread: serialize.cpp uses objArrayOopDesc::base_offset_in_bytes(T_BYTE)

serialize.cpp uses objArrayOopDesc::base_offset_in_bytes(T_BYTE)

by Christian Thalinger-3 :: Rate this Message:

Reply to Author | View in Thread

Hi!

Yesterday I wanted to add:

   objArrayOopDesc::base_offset_in_bytes() (note: with no argument)

because an objArrayOopDesc holds only oops anyway, so always using
T_OBJECT seems correct to me.

After adding the method and doing a compile, I noticed that
serialize.cpp:54 uses it like this:

   soc->do_tag(objArrayOopDesc::base_offset_in_bytes(T_BYTE));

That looks very odd and, unfortunately, does not have a comment that
explains why it is done that way.  Can someone explain to me why T_BYTE
is used in that case and if it could be changed to T_OBJECT?

-- Christian

 « Return to Thread: serialize.cpp uses objArrayOopDesc::base_offset_in_bytes(T_BYTE)