< prev index next >

src/hotspot/share/opto/subnode.cpp

Print this page

        

*** 875,893 **** } else return TypeInt::CC; } static inline Node* isa_java_mirror_load(PhaseGVN* phase, Node* n) { ! // Return the klass node for ! // LoadP(AddP(foo:Klass, #java_mirror)) // or NULL if not matching. if (n->Opcode() != Op_LoadP) return NULL; const TypeInstPtr* tp = phase->type(n)->isa_instptr(); if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL; Node* adr = n->in(MemNode::Address); intptr_t off = 0; Node* k = AddPNode::Ideal_base_and_offset(adr, phase, off); if (k == NULL) return NULL; const TypeKlassPtr* tkp = phase->type(k)->isa_klassptr(); if (!tkp || off != in_bytes(Klass::java_mirror_offset())) return NULL; --- 875,897 ---- } else return TypeInt::CC; } static inline Node* isa_java_mirror_load(PhaseGVN* phase, Node* n) { ! // Return the klass node for (indirect load from OopHandle) ! // LoadP(LoadP(AddP(foo:Klass, #java_mirror))) // or NULL if not matching. if (n->Opcode() != Op_LoadP) return NULL; const TypeInstPtr* tp = phase->type(n)->isa_instptr(); if (!tp || tp->klass() != phase->C->env()->Class_klass()) return NULL; Node* adr = n->in(MemNode::Address); + // First load from OopHandle + if (adr->Opcode() != Op_LoadP || !phase->type(adr)->isa_rawptr()) return NULL; + adr = adr->in(MemNode::Address); + intptr_t off = 0; Node* k = AddPNode::Ideal_base_and_offset(adr, phase, off); if (k == NULL) return NULL; const TypeKlassPtr* tkp = phase->type(k)->isa_klassptr(); if (!tkp || off != in_bytes(Klass::java_mirror_offset())) return NULL;
< prev index next >