7117052: instanceKlass::_init_state can be u1 type

Change instanceKlass::_init_state field to u1 type.

Reviewed-by: bdelsart, coleenp, dholmes, phh, never
This commit is contained in:
Jiangli Zhou 2011-12-06 18:28:51 -05:00 committed by Coleen Phillimore
parent 8e81e037e7
commit f9f4ba0203
14 changed files with 27 additions and 19 deletions

View file

@ -230,7 +230,9 @@ void Parse::emit_guard_for_new(ciInstanceKlass* klass) {
Node* init_state_offset = _gvn.MakeConX(instanceKlass::init_state_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes());
adr_node = basic_plus_adr(kls, kls, init_state_offset);
Node* init_state = make_load(NULL, adr_node, TypeInt::INT, T_INT);
// Use T_BOOLEAN for instanceKlass::_init_state so the compiler
// can generate code to load it as unsigned byte.
Node* init_state = make_load(NULL, adr_node, TypeInt::UBYTE, T_BOOLEAN);
Node* being_init = _gvn.intcon(instanceKlass::being_initialized);
tst = Bool( CmpI( init_state, being_init), BoolTest::eq);
iff = create_and_map_if(control(), tst, PROB_ALWAYS, COUNT_UNKNOWN);