src/share/vm/opto/macro.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/macro.cpp Tue Apr 22 13:56:30 2008
--- new/src/share/vm/opto/macro.cpp Tue Apr 22 13:56:29 2008
*** 582,592 ****
--- 582,592 ----
offset = array_base + j * element_size;
}
const Type *field_type;
// The next code is taken from Parse::do_get_xxx().
! if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) {
if (!elem_type->is_loaded()) {
field_type = TypeInstPtr::BOTTOM;
} else if (field != NULL && field->is_constant()) {
// This can happen if the constant oop is non-perm.
ciObject* con = field->constant_value().as_object();
*** 595,604 ****
--- 595,608 ----
field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
assert(field_type != NULL, "field singleton type must be consistent");
} else {
field_type = TypeOopPtr::make_from_klass(elem_type->as_klass());
}
+ if (UseCompressedOops) {
+ field_type = field_type->is_oopptr()->make_narrowoop();
+ basic_elem_type = T_NARROWOOP;
+ }
} else {
field_type = Type::get_const_basic_type(basic_elem_type);
}
const TypeOopPtr *field_addr_type = res_type->add_offset(offset)->isa_oopptr();
*** 657,666 ****
--- 661,677 ----
res->dump();
}
#endif
return false;
}
+ if (UseCompressedOops && field_type->isa_narrowoop()) {
+ // Enable "DecodeN(EncodeP(Allocate)) --> Allocate" transformation
+ // to be able scalar replace the allocation.
+ _igvn.set_delay_transform(false);
+ field_val = DecodeNNode::decode(&_igvn, field_val);
+ _igvn.set_delay_transform(true);
+ }
sfpt->add_req(field_val);
}
JVMState *jvms = sfpt->jvms();
jvms->set_endoff(sfpt->req());
// Now make a pass over the debug information replacing any references
src/share/vm/opto/macro.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File