src/share/vm/opto/type.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/type.cpp	Fri Jan  9 14:18:23 2009
--- new/src/share/vm/opto/type.cpp	Fri Jan  9 14:18:23 2009

*** 2469,2478 **** --- 2469,2480 ---- const Type *TypeOopPtr::filter( const Type *kills ) const { const Type* ft = join(kills); const TypeInstPtr* ftip = ft->isa_instptr(); const TypeInstPtr* ktip = kills->isa_instptr(); + const TypeKlassPtr* ftkp = ft->isa_klassptr(); + const TypeKlassPtr* ktkp = kills->isa_klassptr(); if (ft->empty()) { // Check for evil case of 'this' being a class and 'kills' expecting an // interface. This can happen because the bytecodes do not contain // enough type info to distinguish a Java-level interface variable
*** 2482,2491 **** --- 2484,2495 ---- // be 'I' or 'j/l/O'. Thus we'll pick 'j/l/O'. If this then flows // into a Phi which "knows" it's an Interface type we'll have to // uplift the type. if (!empty() && ktip != NULL && ktip->is_loaded() && ktip->klass()->is_interface()) return kills; // Uplift to interface + if (!empty() && ktkp != NULL && ktkp->klass()->is_loaded() && ktkp->klass()->is_interface()) + return kills; // Uplift to interface return Type::TOP; // Canonical empty value } // If we have an interface-typed Phi or cast and we narrow to a class type,
*** 2497,2506 **** --- 2501,2516 ---- ftip->is_loaded() && ftip->klass()->is_interface() && ktip->is_loaded() && !ktip->klass()->is_interface()) { // Happens in a CTW of rt.jar, 320-341, no extra flags return ktip->cast_to_ptr_type(ftip->ptr()); } + if (ftkp != NULL && ktkp != NULL && + ftkp->is_loaded() && ftkp->klass()->is_interface() && + ktkp->is_loaded() && !ktkp->klass()->is_interface()) { + // Happens in a CTW of rt.jar, 320-341, no extra flags + return ktkp->cast_to_ptr_type(ftkp->ptr()); + } return ft; } //------------------------------eq---------------------------------------------

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