8245289: Clean up offset code in JavaClasses

Make offset member names consistent and private, move static initializations near owning classes

Reviewed-by: fparain, lfoltan
This commit is contained in:
Coleen Phillimore 2020-05-29 15:00:19 -04:00
parent e639c9a840
commit 5314d28f84
36 changed files with 789 additions and 843 deletions

View file

@ -1585,7 +1585,7 @@ Compile::AliasType* Compile::find_alias_type(const TypePtr* adr_type, bool no_cr
if (flat == TypeInstPtr::KLASS) alias_type(idx)->set_rewritable(false);
if (flat == TypeAryPtr::RANGE) alias_type(idx)->set_rewritable(false);
if (flat->isa_instptr()) {
if (flat->offset() == java_lang_Class::klass_offset_in_bytes()
if (flat->offset() == java_lang_Class::klass_offset()
&& flat->is_instptr()->klass() == env()->Class_klass())
alias_type(idx)->set_rewritable(false);
}