hotspot/src/share/vm/opto/graphKit.cpp
changeset 29580 a67a581cfe11
parent 29362 4188dc7f05a8
child 29698 9be8d1b0dfdc
child 30185 4b08d63ac105
equal deleted inserted replaced
29477:82f545c6572b 29580:a67a581cfe11
  3025     // for checkcast and aastore the type of superklass should be exact.
  3025     // for checkcast and aastore the type of superklass should be exact.
  3026     const TypeOopPtr* obj_type = _gvn.type(obj)->is_oopptr();
  3026     const TypeOopPtr* obj_type = _gvn.type(obj)->is_oopptr();
  3027     // We may not have profiling here or it may not help us. If we have
  3027     // We may not have profiling here or it may not help us. If we have
  3028     // a speculative type use it to perform an exact cast.
  3028     // a speculative type use it to perform an exact cast.
  3029     ciKlass* spec_obj_type = obj_type->speculative_type();
  3029     ciKlass* spec_obj_type = obj_type->speculative_type();
  3030     if (spec_obj_type != NULL ||
  3030     if (spec_obj_type != NULL || data != NULL) {
  3031         (data != NULL &&
       
  3032          // Counter has never been decremented (due to cast failure).
       
  3033          // ...This is a reasonable thing to expect.  It is true of
       
  3034          // all casts inserted by javac to implement generic types.
       
  3035          data->as_CounterData()->count() >= 0)) {
       
  3036       cast_obj = maybe_cast_profiled_receiver(not_null_obj, tk->klass(), spec_obj_type, safe_for_replace);
  3031       cast_obj = maybe_cast_profiled_receiver(not_null_obj, tk->klass(), spec_obj_type, safe_for_replace);
  3037       if (cast_obj != NULL) {
  3032       if (cast_obj != NULL) {
  3038         if (failure_control != NULL) // failure is now impossible
  3033         if (failure_control != NULL) // failure is now impossible
  3039           (*failure_control) = top();
  3034           (*failure_control) = top();
  3040         // adjust the type of the phi to the exact klass:
  3035         // adjust the type of the phi to the exact klass: