changeset 7721:412051537b21

Merge
author asaha
date Tue, 25 Aug 2015 11:20:35 -0700
parents 3796eee85889 cc0b8e21a7bb
children 4fa5562faaf6
files .hgtags
diffstat 4 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Aug 17 14:02:43 2015 -0700
+++ b/.hgtags	Tue Aug 25 11:20:35 2015 -0700
@@ -733,6 +733,7 @@
 d8519b30e607f87cad6c949c6b52c1dba0cde7a8 jdk8u65-b08
 c6d1a21e213d62f423ac9013bcc7dc0bc05e38b6 jdk8u65-b09
 0274b03fdf4a3e4d125547d68ed74b4f55d515ec jdk8u65-b10
+a106723ba50719c479614d1f599e951edb51506c jdk8u65-b11
 878cb0df27c22c6b1e9f4add1eb3da3edc8ab51d jdk8u66-b00
 777a354cada52b831a32bfc5362ad7cedfde4450 jdk8u66-b01
 0366ad2644f58ec88af9cb2ea8c23a02559fb2d1 hs25.66-b02
@@ -742,4 +743,5 @@
 aedefb75358f3cda5181bf594c2cda833056b25a jdk8u66-b08
 83621deea0fcb4a517b94c5546b4f8738588cb6c jdk8u66-b09
 5280a8174aea13bd242480419e6228857dac7b59 jdk8u66-b10
+8a23b6392c590b7bf5f6ad2c4746dc03981a7f60 jdk8u66-b11
 9a158a0c243beb610dbaabd63d6218d3ce5825f1 jdk8u71-b00
--- a/src/share/vm/classfile/javaClasses.cpp	Mon Aug 17 14:02:43 2015 -0700
+++ b/src/share/vm/classfile/javaClasses.cpp	Tue Aug 25 11:20:35 2015 -0700
@@ -782,6 +782,22 @@
   return name;
 }
 
+// Returns the Java name for this Java mirror (Resource allocated)
+// See Klass::external_name().
+// For primitive type Java mirrors, its type name is returned.
+const char* java_lang_Class::as_external_name(oop java_class) {
+  assert(java_lang_Class::is_instance(java_class), "must be a Class object");
+  const char* name = NULL;
+  if (is_primitive(java_class)) {
+    name = type2name(primitive_type(java_class));
+  } else {
+    name = as_Klass(java_class)->external_name();
+  }
+  if (name == NULL) {
+    name = "<null>";
+  }
+  return name;
+}
 
 Klass* java_lang_Class::array_klass(oop java_class) {
   Klass* k = ((Klass*)java_class->metadata_field(_array_klass_offset));
--- a/src/share/vm/classfile/javaClasses.hpp	Mon Aug 17 14:02:43 2015 -0700
+++ b/src/share/vm/classfile/javaClasses.hpp	Tue Aug 25 11:20:35 2015 -0700
@@ -270,6 +270,7 @@
   }
   static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
   static void print_signature(oop java_class, outputStream *st);
+  static const char* as_external_name(oop java_class);
   // Testing
   static bool is_instance(oop obj) {
     return obj != NULL && obj->klass() == SystemDictionary::Class_klass();
--- a/src/share/vm/runtime/vframe.cpp	Mon Aug 17 14:02:43 2015 -0700
+++ b/src/share/vm/runtime/vframe.cpp	Tue Aug 25 11:20:35 2015 -0700
@@ -148,8 +148,7 @@
   if (obj.not_null()) {
     st->print("\t- %s <" INTPTR_FORMAT "> ", lock_state, (address)obj());
     if (obj->klass() == SystemDictionary::Class_klass()) {
-      Klass* target_klass = java_lang_Class::as_Klass(obj());
-      st->print_cr("(a java.lang.Class for %s)", InstanceKlass::cast(target_klass)->external_name());
+      st->print_cr("(a java.lang.Class for %s)", java_lang_Class::as_external_name(obj()));
     } else {
       Klass* k = obj->klass();
       st->print_cr("(a %s)", k->external_name());