Mercurial > hg > truffle
diff src/share/vm/opto/compile.cpp @ 4762:069ab3f976d3
7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions
Summary: Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix.
Reviewed-by: never, bdelsart, coleenp, jrose
author | stefank |
---|---|
date | Wed, 07 Dec 2011 11:35:03 +0100 |
parents | 669f6a7d5b70 |
children | d12a66fa3820 |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp Tue Dec 20 00:55:02 2011 -0800 +++ b/src/share/vm/opto/compile.cpp Wed Dec 07 11:35:03 2011 +0100 @@ -1306,12 +1306,12 @@ // these 2 disparate memories into the same alias class. Since the // primary supertype array is read-only, there's no chance of confusion // where we bypass an array load and an array store. - int primary_supers_offset = sizeof(klassOopDesc) + Klass::primary_supers_offset_in_bytes(); + int primary_supers_offset = in_bytes(Klass::primary_supers_offset()); if (offset == Type::OffsetBot || (offset >= primary_supers_offset && offset < (int)(primary_supers_offset + Klass::primary_super_limit() * wordSize)) || - offset == (int)(sizeof(klassOopDesc) + Klass::secondary_super_cache_offset_in_bytes())) { - offset = sizeof(klassOopDesc) + Klass::secondary_super_cache_offset_in_bytes(); + offset == (int)in_bytes(Klass::secondary_super_cache_offset())) { + offset = in_bytes(Klass::secondary_super_cache_offset()); tj = tk = TypeKlassPtr::make( TypePtr::NotNull, tk->klass(), offset ); } } @@ -1490,13 +1490,13 @@ alias_type(idx)->set_rewritable(false); } if (flat->isa_klassptr()) { - if (flat->offset() == Klass::super_check_offset_offset_in_bytes() + (int)sizeof(oopDesc)) + if (flat->offset() == in_bytes(Klass::super_check_offset_offset())) alias_type(idx)->set_rewritable(false); - if (flat->offset() == Klass::modifier_flags_offset_in_bytes() + (int)sizeof(oopDesc)) + if (flat->offset() == in_bytes(Klass::modifier_flags_offset())) alias_type(idx)->set_rewritable(false); - if (flat->offset() == Klass::access_flags_offset_in_bytes() + (int)sizeof(oopDesc)) + if (flat->offset() == in_bytes(Klass::access_flags_offset())) alias_type(idx)->set_rewritable(false); - if (flat->offset() == Klass::java_mirror_offset_in_bytes() + (int)sizeof(oopDesc)) + if (flat->offset() == in_bytes(Klass::java_mirror_offset())) alias_type(idx)->set_rewritable(false); } // %%% (We would like to finalize JavaThread::threadObj_offset(),