mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8139203: Consistent naming for klass type predicates
8138923: Remove oop coupling with InstanceKlass subclasses Renamed oop_is_instance and friends, removed the functions in oop that dug down into InstanceKlass. Reviewed-by: jrose, lfoltan, stefank
This commit is contained in:
parent
5179fc3488
commit
fc03719078
68 changed files with 257 additions and 279 deletions
|
@ -563,7 +563,7 @@ JNI_ENTRY(jclass, jni_GetSuperclass(JNIEnv *env, jclass sub))
|
|||
// return mirror for superclass
|
||||
Klass* super = k->java_super();
|
||||
// super2 is the value computed by the compiler's getSuperClass intrinsic:
|
||||
debug_only(Klass* super2 = ( k->oop_is_array()
|
||||
debug_only(Klass* super2 = ( k->is_array_klass()
|
||||
? SystemDictionary::Object_klass()
|
||||
: k->super() ) );
|
||||
assert(super == super2,
|
||||
|
@ -1344,14 +1344,14 @@ static jmethodID get_method_id(JNIEnv *env, jclass clazz, const char *name_str,
|
|||
if (name == vmSymbols::object_initializer_name() ||
|
||||
name == vmSymbols::class_initializer_name()) {
|
||||
// Never search superclasses for constructors
|
||||
if (klass->oop_is_instance()) {
|
||||
if (klass->is_instance_klass()) {
|
||||
m = InstanceKlass::cast(klass())->find_method(name, signature);
|
||||
} else {
|
||||
m = NULL;
|
||||
}
|
||||
} else {
|
||||
m = klass->lookup_method(name, signature);
|
||||
if (m == NULL && klass->oop_is_instance()) {
|
||||
if (m == NULL && klass->is_instance_klass()) {
|
||||
m = InstanceKlass::cast(klass())->lookup_method_in_ordered_interfaces(name, signature);
|
||||
}
|
||||
}
|
||||
|
@ -2038,7 +2038,7 @@ JNI_ENTRY(jfieldID, jni_GetFieldID(JNIEnv *env, jclass clazz,
|
|||
k()->initialize(CHECK_NULL);
|
||||
|
||||
fieldDescriptor fd;
|
||||
if (!k()->oop_is_instance() ||
|
||||
if (!k()->is_instance_klass() ||
|
||||
!InstanceKlass::cast(k())->find_field(fieldname, signame, false, &fd)) {
|
||||
THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name);
|
||||
}
|
||||
|
@ -2292,7 +2292,7 @@ JNI_ENTRY(jfieldID, jni_GetStaticFieldID(JNIEnv *env, jclass clazz,
|
|||
k()->initialize(CHECK_NULL);
|
||||
|
||||
fieldDescriptor fd;
|
||||
if (!k()->oop_is_instance() ||
|
||||
if (!k()->is_instance_klass() ||
|
||||
!InstanceKlass::cast(k())->find_field(fieldname, signame, true, &fd)) {
|
||||
THROW_MSG_0(vmSymbols::java_lang_NoSuchFieldError(), (char*) name);
|
||||
}
|
||||
|
@ -3045,7 +3045,7 @@ JNI_ENTRY(jint, jni_UnregisterNatives(JNIEnv *env, jclass clazz))
|
|||
HOTSPOT_JNI_UNREGISTERNATIVES_ENTRY(env, clazz);
|
||||
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(clazz));
|
||||
//%note jni_2
|
||||
if (k->oop_is_instance()) {
|
||||
if (k->is_instance_klass()) {
|
||||
for (int index = 0; index < InstanceKlass::cast(k)->methods()->length(); index++) {
|
||||
Method* m = InstanceKlass::cast(k)->methods()->at(index);
|
||||
if (m->is_native()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue