< prev index next >

src/hotspot/share/oops/weakHandle.hpp

Print this page

        

@@ -37,11 +37,11 @@
 // the GC cycle.  The runtime structures that reference the oop must test
 // if the value is NULL.  If it is NULL, it has been cleaned out by GC.
 // This is the vm version of jweak but has different GC lifetimes and policies,
 // depending on the type.
 
-enum WeakHandleType { vm_class_loader_data, vm_string_table_data, vm_resolved_method_table_data };
+enum WeakHandleType { vm_class_loader_data, vm_string_table_data, vm_resolved_method_table_data, vm_nmethod_keepalive_data };
 
 template <WeakHandleType T>
 class WeakHandle {
  public:
  private:

@@ -51,16 +51,18 @@
   static OopStorage* get_storage();
  public:
   WeakHandle() : _obj(NULL) {} // needed for init
 
   static WeakHandle create(Handle obj);
+  static WeakHandle from_raw(oop* raw);
   inline oop resolve() const;
   inline oop peek() const;
   void release() const;
   bool is_null() const { return _obj == NULL; }
 
   void replace(oop with_obj);
+  oop* raw() { return _obj; }
 
   void print() const;
   void print_on(outputStream* st) const;
 };
 
< prev index next >