Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/jvmtiEnv.cpp @ 6988:2cb439954abf
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 19 Nov 2012 15:36:13 +0100 |
parents | e522a00b91aa 070d523b96a7 |
children | 291ffc492eb6 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp Sun Nov 18 22:45:43 2012 +0100 +++ b/src/share/vm/prims/jvmtiEnv.cpp Mon Nov 19 15:36:13 2012 +0100 @@ -2116,7 +2116,7 @@ result[0] = tchar; result[1] = '\0'; } else { - const char* class_sig = Klass::cast(k)->signature_name(); + const char* class_sig = k->signature_name(); result = (char *) jvmtiMalloc(strlen(class_sig)+1); strcpy(result, class_sig); } @@ -2124,7 +2124,7 @@ } if (generic_ptr != NULL) { *generic_ptr = NULL; - if (!isPrimitive && Klass::cast(k)->oop_is_instance()) { + if (!isPrimitive && k->oop_is_instance()) { Symbol* soo = InstanceKlass::cast(k)->generic_signature(); if (soo != NULL) { const char *gen_sig = soo->as_C_string(); @@ -2155,7 +2155,7 @@ } else { Klass* k = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); - result = Klass::cast(k)->jvmti_class_status(); + result = k->jvmti_class_status(); } *status_ptr = result; @@ -2173,7 +2173,7 @@ Klass* k_klass = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k_klass, JVMTI_ERROR_INVALID_CLASS); - if (!Klass::cast(k_klass)->oop_is_instance()) { + if (!k_klass->oop_is_instance()) { return JVMTI_ERROR_ABSENT_INFORMATION; } @@ -2200,7 +2200,7 @@ if (!java_lang_Class::is_primitive(k_mirror)) { Klass* k = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); - result = Klass::cast(k)->compute_modifier_flags(current_thread); + result = k->compute_modifier_flags(current_thread); JavaThread* THREAD = current_thread; // pass to macros if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; @@ -2208,7 +2208,7 @@ }; // Reset the deleted ACC_SUPER bit ( deleted in compute_modifier_flags()). - if(Klass::cast(k)->is_super()) { + if(k->is_super()) { result |= JVM_ACC_SUPER; } } else { @@ -2237,11 +2237,11 @@ NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); // Return CLASS_NOT_PREPARED error as per JVMTI spec. - if (!(Klass::cast(k)->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) { + if (!(k->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) { return JVMTI_ERROR_CLASS_NOT_PREPARED; } - if (!Klass::cast(k)->oop_is_instance()) { + if (!k->oop_is_instance()) { *method_count_ptr = 0; *methods_ptr = (jmethodID*) jvmtiMalloc(0 * sizeof(jmethodID)); return JVMTI_ERROR_NONE; @@ -2293,11 +2293,11 @@ NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); // Return CLASS_NOT_PREPARED error as per JVMTI spec. - if (!(Klass::cast(k)->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) { + if (!(k->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) { return JVMTI_ERROR_CLASS_NOT_PREPARED; } - if (!Klass::cast(k)->oop_is_instance()) { + if (!k->oop_is_instance()) { *field_count_ptr = 0; *fields_ptr = (jfieldID*) jvmtiMalloc(0 * sizeof(jfieldID)); return JVMTI_ERROR_NONE; @@ -2348,10 +2348,10 @@ NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); // Return CLASS_NOT_PREPARED error as per JVMTI spec. - if (!(Klass::cast(k)->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) + if (!(k->jvmti_class_status() & (JVMTI_CLASS_STATUS_PREPARED|JVMTI_CLASS_STATUS_ARRAY) )) return JVMTI_ERROR_CLASS_NOT_PREPARED; - if (!Klass::cast(k)->oop_is_instance()) { + if (!k->oop_is_instance()) { *interface_count_ptr = 0; *interfaces_ptr = (jclass*) jvmtiMalloc(0 * sizeof(jclass)); return JVMTI_ERROR_NONE; @@ -2363,8 +2363,8 @@ for (int i_index = 0; i_index < result_length; i_index += 1) { Klass* klass_at = interface_list->at(i_index); assert(klass_at->is_klass(), "interfaces must be Klass*s"); - assert(Klass::cast(klass_at)->is_interface(), "interfaces must be interfaces"); - oop mirror_at = Klass::cast(klass_at)->java_mirror(); + assert(klass_at->is_interface(), "interfaces must be interfaces"); + oop mirror_at = klass_at->java_mirror(); Handle handle_at = Handle(current_thread, mirror_at); result_list[i_index] = (jclass) jni_reference(handle_at); } @@ -2468,7 +2468,7 @@ bool result = false; if (!java_lang_Class::is_primitive(k_mirror)) { Klass* k = java_lang_Class::as_Klass(k_mirror); - if (k != NULL && Klass::cast(k)->is_interface()) { + if (k != NULL && k->is_interface()) { result = true; } } @@ -2487,7 +2487,7 @@ bool result = false; if (!java_lang_Class::is_primitive(k_mirror)) { Klass* k = java_lang_Class::as_Klass(k_mirror); - if (k != NULL && Klass::cast(k)->oop_is_array()) { + if (k != NULL && k->oop_is_array()) { result = true; } } @@ -2512,7 +2512,7 @@ Klass* k = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); - oop result_oop = Klass::cast(k)->class_loader(); + oop result_oop = k->class_loader(); if (result_oop == NULL) { *classloader_ptr = (jclass) jni_reference(Handle()); return JVMTI_ERROR_NONE; @@ -2535,7 +2535,7 @@ } Klass* k = java_lang_Class::as_Klass(k_mirror); NULL_CHECK(k, JVMTI_ERROR_INVALID_CLASS); - if (!Klass::cast(k)->oop_is_instance()) { + if (!k->oop_is_instance()) { return JVMTI_ERROR_ABSENT_INFORMATION; } char* sde = InstanceKlass::cast(k)->source_debug_extension();