src/share/vm/opto/cfgnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/cfgnode.cpp	Fri Jun 20 14:33:47 2008
--- new/src/share/vm/opto/cfgnode.cpp	Fri Jun 20 14:33:46 2008

*** 852,862 **** --- 852,863 ---- } // Until we have harmony between classes and interfaces in the type // lattice, we must tread carefully around phis which implicitly // convert the one to the other. ! const TypeInstPtr* ttip = _type->isa_narrowoop() ? _type->isa_narrowoop()->make_oopptr()->isa_instptr() :_type->isa_instptr(); ! const TypePtr* ttp = _type->make_ptr(); + const TypeInstPtr* ttip = (ttp != NULL) ? ttp->isa_instptr() : NULL; bool is_intf = false; if (ttip != NULL) { ciKlass* k = ttip->klass(); if (k->is_loaded() && k->is_interface()) is_intf = true;
*** 871,881 **** --- 872,883 ---- // We assume that each input of an interface-valued Phi is a true // subtype of that interface. This might not be true of the meet // of all the input types. The lattice is not distributive in // such cases. Ward off asserts in type.cpp by refusing to do // meets between interfaces and proper classes. ! const TypeInstPtr* tiip = ti->isa_narrowoop() ? ti->is_narrowoop()->make_oopptr()->isa_instptr() : ti->isa_instptr(); ! const TypePtr* tip = ti->make_ptr(); + const TypeInstPtr* tiip = (tip != NULL) ? tip->isa_instptr() : NULL; if (tiip) { bool ti_is_intf = false; ciKlass* k = tiip->klass(); if (k->is_loaded() && k->is_interface()) ti_is_intf = true;
*** 928,944 **** --- 930,947 ---- // If we have an interface-typed Phi and we narrow to a class type, the join // should report back the class. However, if we have a J/L/Object // class-typed Phi and an interface flows in, it's possible that the meet & // join report an interface back out. This isn't possible but happens // because the type system doesn't interact well with interfaces. ! const TypeInstPtr *jtip = jt->isa_narrowoop() ? jt->isa_narrowoop()->make_oopptr()->isa_instptr() : jt->isa_instptr(); ! const TypePtr *jtp = jt->make_ptr(); + const TypeInstPtr *jtip = (jtp != NULL) ? jtp->isa_instptr() : NULL; if( jtip && ttip ) { if( jtip->is_loaded() && jtip->klass()->is_interface() && ttip->is_loaded() && !ttip->klass()->is_interface() ) { // Happens in a CTW of rt.jar, 320-341, no extra flags assert(ft == ttip->cast_to_ptr_type(jtip->ptr()) || ! ft->isa_narrowoop() && ft->isa_narrowoop()->make_oopptr() == ttip->cast_to_ptr_type(jtip->ptr()), ""); ! ft->isa_narrowoop() && ft->make_ptr() == ttip->cast_to_ptr_type(jtip->ptr()), ""); jt = ft; } } if (jt != ft && jt->base() == ft->base()) { if (jt->isa_int() &&

src/share/vm/opto/cfgnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File