--- old/src/share/vm/opto/library_call.cpp 2011-12-07 12:03:23.000000000 +0100 +++ new/src/share/vm/opto/library_call.cpp 2011-12-07 12:03:23.000000000 +0100 @@ -2165,8 +2165,7 @@ IdealKit ideal(this); #define __ ideal. - const int reference_type_offset = instanceKlass::reference_type_offset_in_bytes() + - sizeof(oopDesc); + const int reference_type_offset = instanceKlass::reference_type_offset_in_bytes(); Node* referent_off = __ ConX(java_lang_ref_Reference::referent_offset); @@ -2806,7 +2805,7 @@ // Note: The argument might still be an illegal value like // Serializable.class or Object[].class. The runtime will handle it. // But we must make an explicit check for initialization. - Node* insp = basic_plus_adr(kls, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc)); + Node* insp = basic_plus_adr(kls, instanceKlass::init_state_offset_in_bytes()); Node* inst = make_load(NULL, insp, TypeInt::INT, T_INT); Node* bits = intcon(instanceKlass::fully_initialized); Node* test = _gvn.transform( new (C, 3) SubINode(inst, bits) ); @@ -2954,7 +2953,7 @@ //---------------------------load_mirror_from_klass---------------------------- // Given a klass oop, load its java mirror (a java.lang.Class oop). Node* LibraryCallKit::load_mirror_from_klass(Node* klass) { - Node* p = basic_plus_adr(klass, Klass::java_mirror_offset_in_bytes() + sizeof(oopDesc)); + Node* p = basic_plus_adr(klass, Klass::java_mirror_offset_in_bytes()); return make_load(NULL, p, TypeInstPtr::MIRROR, T_OBJECT); } @@ -2994,7 +2993,7 @@ Node* LibraryCallKit::generate_access_flags_guard(Node* kls, int modifier_mask, int modifier_bits, RegionNode* region) { // Branch around if the given klass has the given modifier bit set. // Like generate_guard, adds a new path onto the region. - Node* modp = basic_plus_adr(kls, Klass::access_flags_offset_in_bytes() + sizeof(oopDesc)); + Node* modp = basic_plus_adr(kls, Klass::access_flags_offset_in_bytes()); Node* mods = make_load(NULL, modp, TypeInt::INT, T_INT); Node* mask = intcon(modifier_mask); Node* bits = intcon(modifier_bits); @@ -3115,7 +3114,7 @@ break; case vmIntrinsics::_getModifiers: - p = basic_plus_adr(kls, Klass::modifier_flags_offset_in_bytes() + sizeof(oopDesc)); + p = basic_plus_adr(kls, Klass::modifier_flags_offset_in_bytes()); query_value = make_load(NULL, p, TypeInt::INT, T_INT); break; @@ -3155,7 +3154,7 @@ // A guard was added. If the guard is taken, it was an array. phi->add_req(makecon(TypeInstPtr::make(env()->Object_klass()->java_mirror()))); // If we fall through, it's a plain class. Get its _super. - p = basic_plus_adr(kls, Klass::super_offset_in_bytes() + sizeof(oopDesc)); + p = basic_plus_adr(kls, Klass::super_offset_in_bytes()); kls = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeRawPtr::BOTTOM, TypeKlassPtr::OBJECT_OR_NULL) ); null_ctl = top(); kls = null_check_oop(kls, &null_ctl); @@ -3173,7 +3172,7 @@ if (generate_array_guard(kls, region) != NULL) { // Be sure to pin the oop load to the guard edge just created: Node* is_array_ctrl = region->in(region->req()-1); - Node* cma = basic_plus_adr(kls, in_bytes(arrayKlass::component_mirror_offset()) + sizeof(oopDesc)); + Node* cma = basic_plus_adr(kls, in_bytes(arrayKlass::component_mirror_offset())); Node* cmo = make_load(is_array_ctrl, cma, TypeInstPtr::MIRROR, T_OBJECT); phi->add_req(cmo); } @@ -3181,7 +3180,7 @@ break; case vmIntrinsics::_getClassAccessFlags: - p = basic_plus_adr(kls, Klass::access_flags_offset_in_bytes() + sizeof(oopDesc)); + p = basic_plus_adr(kls, Klass::access_flags_offset_in_bytes()); query_value = make_load(NULL, p, TypeInt::INT, T_INT); break; @@ -4857,7 +4856,7 @@ PreserveJVMState pjvms(this); set_control(not_subtype_ctrl); // (At this point we can assume disjoint_bases, since types differ.) - int ek_offset = objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc); + int ek_offset = objArrayKlass::element_klass_offset_in_bytes(); Node* p1 = basic_plus_adr(dest_klass, ek_offset); Node* n1 = LoadKlassNode::make(_gvn, immutable_memory(), p1, TypeRawPtr::BOTTOM); Node* dest_elem_klass = _gvn.transform(n1); @@ -5308,7 +5307,7 @@ // for the target array. This is an optimistic check. It will // look in each non-null element's class, at the desired klass's // super_check_offset, for the desired klass. - int sco_offset = Klass::super_check_offset_offset_in_bytes() + sizeof(oopDesc); + int sco_offset = Klass::super_check_offset_offset_in_bytes(); Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset); Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr()); Node* check_offset = ConvI2X(_gvn.transform(n3));