diff src/share/vm/oops/instanceKlass.hpp @ 7465:37a3e8b7a1e9

Merge
author zgu
date Tue, 08 Jan 2013 11:39:53 -0800
parents ecd24264898b cc6a617fffd2
children 989155e2d07a 4a916f2ce331 337e1dd9d902
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Tue Jan 08 14:04:25 2013 -0500
+++ b/src/share/vm/oops/instanceKlass.hpp	Tue Jan 08 11:39:53 2013 -0800
@@ -460,7 +460,7 @@
   bool link_class_or_fail(TRAPS); // returns false on failure
   void unlink_class();
   void rewrite_class(TRAPS);
-  void relocate_and_link_methods(TRAPS);
+  void link_methods(TRAPS);
   Method* class_initializer();
 
   // set the class to initialized if no static initializer is present
@@ -544,6 +544,12 @@
     }
   }
 
+  // Oop that keeps the metadata for this class from being unloaded
+  // in places where the metadata is stored in other places, like nmethods
+  oop klass_holder() const {
+    return is_anonymous() ? java_mirror() : class_loader();
+  }
+
   // signers
   objArrayOop signers() const              { return _signers; }
   void set_signers(objArrayOop s)          { klass_oop_store((oop*)&_signers, s); }
@@ -657,6 +663,10 @@
     if (annotations() == NULL) return NULL;
     return annotations()->fields_annotations();
   }
+  Annotations* type_annotations() const {
+    if (annotations() == NULL) return NULL;
+    return annotations()->type_annotations();
+  }
 
   // allocation
   instanceOop allocate_instance(TRAPS);