1.1 --- a/src/share/vm/code/dependencies.cpp Fri Nov 09 22:22:53 2012 -0800 1.2 +++ b/src/share/vm/code/dependencies.cpp Mon Nov 12 16:15:05 2012 -0500 1.3 @@ -552,7 +552,7 @@ 1.4 } 1.5 tty->print(" %s = %s", what, (put_star? "*": "")); 1.6 if (arg.is_klass()) 1.7 - tty->print("%s", Klass::cast((Klass*)arg.metadata_value())->external_name()); 1.8 + tty->print("%s", ((Klass*)arg.metadata_value())->external_name()); 1.9 else if (arg.is_method()) 1.10 ((Method*)arg.metadata_value())->print_value(); 1.11 else 1.12 @@ -563,7 +563,7 @@ 1.13 bool put_star = !Dependencies::is_concrete_klass(witness); 1.14 tty->print_cr(" witness = %s%s", 1.15 (put_star? "*": ""), 1.16 - Klass::cast(witness)->external_name()); 1.17 + witness->external_name()); 1.18 } 1.19 } 1.20 1.21 @@ -808,7 +808,7 @@ 1.22 if (!(m->is_public() || m->is_protected())) 1.23 // The override story is complex when packages get involved. 1.24 return true; // Must punt the assertion to true. 1.25 - Klass* k = Klass::cast(ctxk); 1.26 + Klass* k = ctxk; 1.27 Method* lm = k->lookup_method(m->name(), m->signature()); 1.28 if (lm == NULL && k->oop_is_instance()) { 1.29 // It might be an abstract interface method, devoid of mirandas. 1.30 @@ -835,7 +835,7 @@ 1.31 } 1.32 ResourceMark rm; 1.33 tty->print_cr("Dependency method not found in the associated context:"); 1.34 - tty->print_cr(" context = %s", Klass::cast(ctxk)->external_name()); 1.35 + tty->print_cr(" context = %s", ctxk->external_name()); 1.36 tty->print( " method = "); m->print_short_name(tty); tty->cr(); 1.37 if (lm != NULL) { 1.38 tty->print( " found = "); lm->print_short_name(tty); tty->cr(); 1.39 @@ -1010,7 +1010,7 @@ 1.40 for (int i = 0; i < num_participants(); i++) { 1.41 Klass* part = participant(i); 1.42 if (part == NULL) continue; 1.43 - assert(changes.involves_context(part) == Klass::cast(new_type)->is_subtype_of(part), 1.44 + assert(changes.involves_context(part) == new_type->is_subtype_of(part), 1.45 "correct marking of participants, b/c new_type is unique"); 1.46 if (changes.involves_context(part)) { 1.47 // new guy is protected from this check by previous participant 1.48 @@ -1146,7 +1146,7 @@ 1.49 1.50 1.51 bool Dependencies::is_concrete_klass(Klass* k) { 1.52 - if (Klass::cast(k)->is_abstract()) return false; 1.53 + if (k->is_abstract()) return false; 1.54 // %%% We could treat classes which are concrete but 1.55 // have not yet been instantiated as virtually abstract. 1.56 // This would require a deoptimization barrier on first instantiation. 1.57 @@ -1705,12 +1705,12 @@ 1.58 } 1.59 1.60 bool KlassDepChange::involves_context(Klass* k) { 1.61 - if (k == NULL || !Klass::cast(k)->oop_is_instance()) { 1.62 + if (k == NULL || !k->oop_is_instance()) { 1.63 return false; 1.64 } 1.65 InstanceKlass* ik = InstanceKlass::cast(k); 1.66 bool is_contained = ik->is_marked_dependent(); 1.67 - assert(is_contained == Klass::cast(new_type())->is_subtype_of(k), 1.68 + assert(is_contained == new_type()->is_subtype_of(k), 1.69 "correct marking of potential context types"); 1.70 return is_contained; 1.71 }