< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page
@@ -174,18 +174,15 @@
  
  #if INCLUDE_CDS
    // Flags of the current shared class.
    u2     _shared_class_flags;
    enum {
-     _has_raw_archived_mirror = 1,
      _archived_lambda_proxy_is_available = 2
    };
  #endif
  
-   // The _archived_mirror is set at CDS dump time pointing to the cached mirror
-   // in the open archive heap region when archiving java object is supported.
-   CDS_JAVA_HEAP_ONLY(narrowOop _archived_mirror;)
+   CDS_JAVA_HEAP_ONLY(int _archived_mirror_index;)
  
  protected:
  
    // Constructor
    Klass(KlassID id);

@@ -260,13 +257,12 @@
    // java mirror
    oop java_mirror() const;
    oop java_mirror_no_keepalive() const;
    void set_java_mirror(Handle m);
  
-   oop archived_java_mirror_raw() NOT_CDS_JAVA_HEAP_RETURN_(NULL); // no GC barrier
-   narrowOop archived_java_mirror_raw_narrow() NOT_CDS_JAVA_HEAP_RETURN_(narrowOop::null); // no GC barrier
-   void set_archived_java_mirror_raw(oop m) NOT_CDS_JAVA_HEAP_RETURN; // no GC barrier
+   oop archived_java_mirror() NOT_CDS_JAVA_HEAP_RETURN_(NULL);
+   void set_archived_java_mirror(oop m) NOT_CDS_JAVA_HEAP_RETURN;
  
    // Temporary mirror switch used by RedefineClasses
    void replace_java_mirror(oop mirror);
  
    // Set java mirror OopHandle to NULL for CDS

@@ -305,21 +301,17 @@
  
    void set_shared_classpath_index(int index) {
      _shared_class_path_index = index;
    };
  
-   void set_has_raw_archived_mirror() {
-     CDS_ONLY(_shared_class_flags |= _has_raw_archived_mirror;)
-   }
-   void clear_has_raw_archived_mirror() {
-     CDS_ONLY(_shared_class_flags &= ~_has_raw_archived_mirror;)
-   }
-   bool has_raw_archived_mirror() const {
-     CDS_ONLY(return (_shared_class_flags & _has_raw_archived_mirror) != 0;)
-     NOT_CDS(return false;)
+   bool has_archived_mirror_index() const {
+     CDS_JAVA_HEAP_ONLY(return _archived_mirror_index >= 0);
+     NOT_CDS_JAVA_HEAP( return false);
    }
  
+   void clear_archived_mirror_index() NOT_CDS_JAVA_HEAP_RETURN;
+ 
    void set_lambda_proxy_is_available() {
      CDS_ONLY(_shared_class_flags |= _archived_lambda_proxy_is_available;)
    }
    void clear_lambda_proxy_is_available() {
      CDS_ONLY(_shared_class_flags &= ~_archived_lambda_proxy_is_available;)

@@ -532,11 +524,11 @@
    virtual void remove_unshareable_info();
    virtual void remove_java_mirror();
  
    bool is_unshareable_info_restored() const {
      assert(is_shared(), "use this for shared classes only");
-     if (has_raw_archived_mirror()) {
+     if (has_archived_mirror_index()) {
        // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
        return false;
      } else if (_java_mirror.ptr_raw() == NULL) {
        return false;
      } else {
< prev index next >