Mercurial > hg > graal-compiler
diff src/share/vm/code/dependencies.cpp @ 6983:070d523b96a7
8001471: Klass::cast() does nothing
Summary: Remove function Klass::cast() and calls to it.
Reviewed-by: dholmes, coleenp
author | hseigel |
---|---|
date | Mon, 12 Nov 2012 16:15:05 -0500 |
parents | 18fb7da42534 |
children | 80e866b1d053 |
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.cpp Fri Nov 09 22:22:53 2012 -0800 +++ b/src/share/vm/code/dependencies.cpp Mon Nov 12 16:15:05 2012 -0500 @@ -552,7 +552,7 @@ } tty->print(" %s = %s", what, (put_star? "*": "")); if (arg.is_klass()) - tty->print("%s", Klass::cast((Klass*)arg.metadata_value())->external_name()); + tty->print("%s", ((Klass*)arg.metadata_value())->external_name()); else if (arg.is_method()) ((Method*)arg.metadata_value())->print_value(); else @@ -563,7 +563,7 @@ bool put_star = !Dependencies::is_concrete_klass(witness); tty->print_cr(" witness = %s%s", (put_star? "*": ""), - Klass::cast(witness)->external_name()); + witness->external_name()); } } @@ -808,7 +808,7 @@ if (!(m->is_public() || m->is_protected())) // The override story is complex when packages get involved. return true; // Must punt the assertion to true. - Klass* k = Klass::cast(ctxk); + Klass* k = ctxk; Method* lm = k->lookup_method(m->name(), m->signature()); if (lm == NULL && k->oop_is_instance()) { // It might be an abstract interface method, devoid of mirandas. @@ -835,7 +835,7 @@ } ResourceMark rm; tty->print_cr("Dependency method not found in the associated context:"); - tty->print_cr(" context = %s", Klass::cast(ctxk)->external_name()); + tty->print_cr(" context = %s", ctxk->external_name()); tty->print( " method = "); m->print_short_name(tty); tty->cr(); if (lm != NULL) { tty->print( " found = "); lm->print_short_name(tty); tty->cr(); @@ -1010,7 +1010,7 @@ for (int i = 0; i < num_participants(); i++) { Klass* part = participant(i); if (part == NULL) continue; - assert(changes.involves_context(part) == Klass::cast(new_type)->is_subtype_of(part), + assert(changes.involves_context(part) == new_type->is_subtype_of(part), "correct marking of participants, b/c new_type is unique"); if (changes.involves_context(part)) { // new guy is protected from this check by previous participant @@ -1146,7 +1146,7 @@ bool Dependencies::is_concrete_klass(Klass* k) { - if (Klass::cast(k)->is_abstract()) return false; + if (k->is_abstract()) return false; // %%% We could treat classes which are concrete but // have not yet been instantiated as virtually abstract. // This would require a deoptimization barrier on first instantiation. @@ -1705,12 +1705,12 @@ } bool KlassDepChange::involves_context(Klass* k) { - if (k == NULL || !Klass::cast(k)->oop_is_instance()) { + if (k == NULL || !k->oop_is_instance()) { return false; } InstanceKlass* ik = InstanceKlass::cast(k); bool is_contained = ik->is_marked_dependent(); - assert(is_contained == Klass::cast(new_type())->is_subtype_of(k), + assert(is_contained == new_type()->is_subtype_of(k), "correct marking of potential context types"); return is_contained; }