< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page
@@ -163,10 +163,12 @@
                                  // have lots of itable dispatches (e.g., lambdas and streams).
                                  // Keep it away from the beginning of a Klass to avoid cacheline
                                  // contention that may happen when a nearby object is modified.
    AccessFlags _access_flags;    // Access flags. The class/interface distinction is stored here.
  
+   markWord _prototype_header;   // Used to initialize objects' header
+ 
    JFR_ONLY(DEFINE_TRACE_ID_FIELD;)
  
  private:
    // This is an index into FileMapHeader::_shared_path_table[], to
    // associate this class with the JAR file where it's loaded from during

@@ -674,10 +676,17 @@
    inline bool is_non_strong_hidden() const;
  
    bool is_cloneable() const;
    void set_is_cloneable();
  
+   markWord prototype_header() const {
+     assert(UseCompactObjectHeaders, "only use with compact object headers");
+     return _prototype_header;
+   }
+   inline void set_prototype_header(markWord header);
+   static ByteSize prototype_header_offset() { return in_ByteSize(offset_of(Klass, _prototype_header)); }
+ 
    JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
  
    virtual void metaspace_pointers_do(MetaspaceClosure* iter);
    virtual MetaspaceObj::Type type() const { return ClassType; }
  
< prev index next >