hotspot/src/share/vm/opto/type.cpp
changeset 5125 21bde52d7c5e
parent 5030 b9d96b4469eb
parent 5124 9dd40e895ad1
child 5547 f4b087cbb361
equal deleted inserted replaced
5109:7077b95d42f6 5125:21bde52d7c5e
  2543   // because the type system doesn't interact well with interfaces.
  2543   // because the type system doesn't interact well with interfaces.
  2544   if (ftip != NULL && ktip != NULL &&
  2544   if (ftip != NULL && ktip != NULL &&
  2545       ftip->is_loaded() &&  ftip->klass()->is_interface() &&
  2545       ftip->is_loaded() &&  ftip->klass()->is_interface() &&
  2546       ktip->is_loaded() && !ktip->klass()->is_interface()) {
  2546       ktip->is_loaded() && !ktip->klass()->is_interface()) {
  2547     // Happens in a CTW of rt.jar, 320-341, no extra flags
  2547     // Happens in a CTW of rt.jar, 320-341, no extra flags
       
  2548     assert(!ftip->klass_is_exact(), "interface could not be exact");
  2548     return ktip->cast_to_ptr_type(ftip->ptr());
  2549     return ktip->cast_to_ptr_type(ftip->ptr());
  2549   }
  2550   }
       
  2551   // Interface klass type could be exact in opposite to interface type,
       
  2552   // return it here instead of incorrect Constant ptr J/L/Object (6894807).
  2550   if (ftkp != NULL && ktkp != NULL &&
  2553   if (ftkp != NULL && ktkp != NULL &&
  2551       ftkp->is_loaded() &&  ftkp->klass()->is_interface() &&
  2554       ftkp->is_loaded() &&  ftkp->klass()->is_interface() &&
       
  2555       !ftkp->klass_is_exact() && // Keep exact interface klass
  2552       ktkp->is_loaded() && !ktkp->klass()->is_interface()) {
  2556       ktkp->is_loaded() && !ktkp->klass()->is_interface()) {
  2553     // Happens in a CTW of rt.jar, 320-341, no extra flags
       
  2554     return ktkp->cast_to_ptr_type(ftkp->ptr());
  2557     return ktkp->cast_to_ptr_type(ftkp->ptr());
  2555   }
  2558   }
  2556 
  2559 
  2557   return ft;
  2560   return ft;
  2558 }
  2561 }