hotspot/src/share/vm/oops/method.hpp
changeset 46746 ea379ebb9447
parent 46727 6e4a84748e2c
equal deleted inserted replaced
46745:f7b9bb98bb72 46746:ea379ebb9447
    64 
    64 
    65 class Method : public Metadata {
    65 class Method : public Metadata {
    66  friend class VMStructs;
    66  friend class VMStructs;
    67  friend class JVMCIVMStructs;
    67  friend class JVMCIVMStructs;
    68  private:
    68  private:
       
    69   // If you add a new field that points to any metaspace object, you
       
    70   // must add this field to Method::metaspace_pointers_do().
    69   ConstMethod*      _constMethod;                // Method read-only data.
    71   ConstMethod*      _constMethod;                // Method read-only data.
    70   MethodData*       _method_data;
    72   MethodData*       _method_data;
    71   MethodCounters*   _method_counters;
    73   MethodCounters*   _method_counters;
    72   AccessFlags       _access_flags;               // Access flags
    74   AccessFlags       _access_flags;               // Access flags
    73   int               _vtable_index;               // vtable index of this method (see VtableIndexFlag)
    75   int               _vtable_index;               // vtable index of this method (see VtableIndexFlag)
   468   }
   470   }
   469   // setup entry points
   471   // setup entry points
   470   void link_method(const methodHandle& method, TRAPS);
   472   void link_method(const methodHandle& method, TRAPS);
   471   // clear entry points. Used by sharing code during dump time
   473   // clear entry points. Used by sharing code during dump time
   472   void unlink_method() NOT_CDS_RETURN;
   474   void unlink_method() NOT_CDS_RETURN;
       
   475 
       
   476   virtual void metaspace_pointers_do(MetaspaceClosure* iter);
       
   477   virtual MetaspaceObj::Type type() const { return MethodType; }
   473 
   478 
   474   // vtable index
   479   // vtable index
   475   enum VtableIndexFlag {
   480   enum VtableIndexFlag {
   476     // Valid vtable indexes are non-negative (>= 0).
   481     // Valid vtable indexes are non-negative (>= 0).
   477     // These few negative values are used as sentinels.
   482     // These few negative values are used as sentinels.