--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp Fri Nov 09 22:22:53 2012 -0800
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp Mon Nov 12 16:15:05 2012 -0500
@@ -81,7 +81,7 @@
Array<Klass*>* element_supers = element_klass->secondary_supers();
for( int i = element_supers->length()-1; i >= 0; i-- ) {
Klass* elem_super = element_supers->at(i);
- if (Klass::cast(elem_super)->array_klass_or_null() == NULL) {
+ if (elem_super->array_klass_or_null() == NULL) {
supers_exist = false;
break;
}
@@ -172,7 +172,7 @@
} else {
bk = element_klass();
}
- assert(bk != NULL && (Klass::cast(bk)->oop_is_instance() || Klass::cast(bk)->oop_is_typeArray()), "invalid bottom klass");
+ assert(bk != NULL && (bk->oop_is_instance() || bk->oop_is_typeArray()), "invalid bottom klass");
this->set_bottom_klass(bk);
this->set_class_loader_data(bk->class_loader_data());
@@ -254,7 +254,7 @@
// We have to make sure all elements conform to the destination array
Klass* bound = ObjArrayKlass::cast(d->klass())->element_klass();
Klass* stype = ObjArrayKlass::cast(s->klass())->element_klass();
- if (stype == bound || Klass::cast(stype)->is_subtype_of(bound)) {
+ if (stype == bound || stype->is_subtype_of(bound)) {
// elements are guaranteed to be subtypes, so no check necessary
bs->write_ref_array_pre(dst, length);
Copy::conjoint_oops_atomic(src, dst, length);
@@ -271,7 +271,7 @@
oop new_val = element_is_null ? oop(NULL)
: oopDesc::decode_heap_oop_not_null(element);
if (element_is_null ||
- Klass::cast((new_val->klass()))->is_subtype_of(bound)) {
+ (new_val->klass())->is_subtype_of(bound)) {
bs->write_ref_field_pre(p, new_val);
*p = *from;
} else {
@@ -381,7 +381,7 @@
GrowableArray<Klass*>* ObjArrayKlass::compute_secondary_supers(int num_extra_slots) {
// interfaces = { cloneable_klass, serializable_klass, elemSuper[], ... };
- Array<Klass*>* elem_supers = Klass::cast(element_klass())->secondary_supers();
+ Array<Klass*>* elem_supers = element_klass()->secondary_supers();
int num_elem_supers = elem_supers == NULL ? 0 : elem_supers->length();
int num_secondaries = num_extra_slots + 2 + num_elem_supers;
if (num_secondaries == 2) {
@@ -411,7 +411,7 @@
}
void ObjArrayKlass::initialize(TRAPS) {
- Klass::cast(bottom_klass())->initialize(THREAD); // dispatches to either InstanceKlass or TypeArrayKlass
+ bottom_klass()->initialize(THREAD); // dispatches to either InstanceKlass or TypeArrayKlass
}
#define ObjArrayKlass_SPECIALIZED_OOP_ITERATE(T, a, p, do_oop) \
@@ -607,7 +607,7 @@
return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC;
}
// Return the flags of the bottom element type.
- jint element_flags = Klass::cast(bottom_klass())->compute_modifier_flags(CHECK_0);
+ jint element_flags = bottom_klass()->compute_modifier_flags(CHECK_0);
return (element_flags & (JVM_ACC_PUBLIC | JVM_ACC_PRIVATE | JVM_ACC_PROTECTED))
| (JVM_ACC_ABSTRACT | JVM_ACC_FINAL);
@@ -686,7 +686,7 @@
guarantee(element_klass()->is_klass(), "should be klass");
guarantee(bottom_klass()->is_metadata(), "should be in metaspace");
guarantee(bottom_klass()->is_klass(), "should be klass");
- Klass* bk = Klass::cast(bottom_klass());
+ Klass* bk = bottom_klass();
guarantee(bk->oop_is_instance() || bk->oop_is_typeArray(), "invalid bottom klass");
}