6860920: serialize.cpp shouldn't use objArrayOopDesc::base_offset_in_bytes(T_BYTE)

Serialize.cpp currently uses objArrayOopDesc::base_offset_in_bytes(T_BYTE), which seems to be wrong.

Reviewed-by: coleenp, kvn
This commit is contained in:
Christian Thalinger 2009-07-20 08:20:00 -07:00
parent 7229ae9b95
commit 6b849a12a0
3 changed files with 7 additions and 2 deletions

View file

@ -38,6 +38,11 @@ class objArrayOopDesc : public arrayOopDesc {
}
public:
// Returns the offset of the first element.
static int base_offset_in_bytes() {
return arrayOopDesc::base_offset_in_bytes(T_OBJECT);
}
// base is the address following the header.
HeapWord* base() const { return (HeapWord*) arrayOopDesc::base(T_OBJECT); }