hotspot/src/share/vm/opto/memnode.cpp
changeset 371 1aacedc9db7c
parent 366 449c27706bac
child 375 6969999e4e7b
equal deleted inserted replaced
370:33ba64c16c1f 371:1aacedc9db7c
   752 #ifdef _LP64
   752 #ifdef _LP64
   753     if (adr->bottom_type()->is_narrow()) {
   753     if (adr->bottom_type()->is_narrow()) {
   754       const TypeNarrowOop* narrowtype;
   754       const TypeNarrowOop* narrowtype;
   755       if (rt->isa_narrowoop()) {
   755       if (rt->isa_narrowoop()) {
   756         narrowtype = rt->is_narrowoop();
   756         narrowtype = rt->is_narrowoop();
   757         rt = narrowtype->make_oopptr();
       
   758       } else {
   757       } else {
   759         narrowtype = rt->is_oopptr()->make_narrowoop();
   758         narrowtype = rt->is_oopptr()->make_narrowoop();
   760       }
   759       }
   761       Node* load  = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, narrowtype));
   760       Node* load  = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, narrowtype));
   762 
   761 
   763       return new (C, 2) DecodeNNode(load, rt);
   762       return DecodeNNode::decode(&gvn, load);
   764     } else
   763     } else
   765 #endif
   764 #endif
   766       {
   765       {
   767         assert(!adr->bottom_type()->is_narrow(), "should have got back a narrow oop");
   766         assert(!adr->bottom_type()->is_narrow(), "should have got back a narrow oop");
   768         return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr());
   767         return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr());
  1839 #ifdef _LP64
  1838 #ifdef _LP64
  1840     if (adr->bottom_type()->is_narrow() ||
  1839     if (adr->bottom_type()->is_narrow() ||
  1841         (UseCompressedOops && val->bottom_type()->isa_klassptr() &&
  1840         (UseCompressedOops && val->bottom_type()->isa_klassptr() &&
  1842          adr->bottom_type()->isa_rawptr())) {
  1841          adr->bottom_type()->isa_rawptr())) {
  1843       const TypePtr* type = val->bottom_type()->is_ptr();
  1842       const TypePtr* type = val->bottom_type()->is_ptr();
  1844       Node* cp;
  1843       Node* cp = EncodePNode::encode(&gvn, val);
  1845       if (type->isa_oopptr()) {
       
  1846         const TypeNarrowOop* etype = type->is_oopptr()->make_narrowoop();
       
  1847         cp = gvn.transform(new (C, 2) EncodePNode(val, etype));
       
  1848       } else if (type == TypePtr::NULL_PTR) {
       
  1849         cp = gvn.transform(new (C, 1) ConNNode(TypeNarrowOop::NULL_PTR));
       
  1850       } else {
       
  1851         ShouldNotReachHere();
       
  1852       }
       
  1853       return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, cp);
  1844       return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, cp);
  1854     } else
  1845     } else
  1855 #endif
  1846 #endif
  1856       {
  1847       {
  1857         return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val);
  1848         return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val);