< prev index next >

src/hotspot/share/oops/oopsHierarchy.hpp

Print this page




  84   // friend class markOop;
  85 public:
  86   void set_obj(const void* p)         {
  87     raw_set_obj(p);
  88     if (CheckUnhandledOops) register_oop();
  89   }
  90   void raw_set_obj(const void* p)     { _o = (oopDesc*)p; }
  91 
  92   oop()                               { set_obj(NULL); }
  93   oop(const oop& o)                   { set_obj(o.obj()); }
  94   oop(const volatile oop& o)          { set_obj(o.obj()); }
  95   oop(const void* p)                  { set_obj(p); }
  96   ~oop()                              {
  97     if (CheckUnhandledOops) unregister_oop();
  98   }
  99 
 100   oopDesc* obj()  const volatile      { return _o; }
 101 
 102   // General access
 103   oopDesc*  operator->() const        { return obj(); }
 104   bool operator==(const oop o) const  { return obj() == o.obj(); }







 105   bool operator==(void *p) const      { return obj() == p; }
 106   bool operator!=(const volatile oop o) const  { return obj() != o.obj(); }







 107   bool operator!=(void *p) const      { return obj() != p; }
 108 
 109   // Assignment
 110   oop& operator=(const oop& o)                            { _o = o.obj(); return *this; }
 111   volatile oop& operator=(const oop& o) volatile          { _o = o.obj(); return *this; }
 112   volatile oop& operator=(const volatile oop& o) volatile { _o = o.obj(); return *this; }
 113 
 114   // Explict user conversions
 115   operator void* () const             { return (void *)obj(); }
 116 #ifndef SOLARIS
 117   operator void* () const volatile    { return (void *)obj(); }
 118 #endif
 119   operator HeapWord* () const         { return (HeapWord*)obj(); }
 120   operator oopDesc* () const volatile { return obj(); }
 121   operator intptr_t* () const         { return (intptr_t*)obj(); }
 122   operator PromotedObject* () const   { return (PromotedObject*)obj(); }
 123   operator markOop () const volatile  { return markOop(obj()); }
 124   operator address   () const         { return (address)obj(); }
 125 
 126   // from javaCalls.cpp




  84   // friend class markOop;
  85 public:
  86   void set_obj(const void* p)         {
  87     raw_set_obj(p);
  88     if (CheckUnhandledOops) register_oop();
  89   }
  90   void raw_set_obj(const void* p)     { _o = (oopDesc*)p; }
  91 
  92   oop()                               { set_obj(NULL); }
  93   oop(const oop& o)                   { set_obj(o.obj()); }
  94   oop(const volatile oop& o)          { set_obj(o.obj()); }
  95   oop(const void* p)                  { set_obj(p); }
  96   ~oop()                              {
  97     if (CheckUnhandledOops) unregister_oop();
  98   }
  99 
 100   oopDesc* obj()  const volatile      { return _o; }
 101 
 102   // General access
 103   oopDesc*  operator->() const        { return obj(); }
 104   bool operator==(const oop o) const  {
 105 #if INCLUDE_SHENANDOAHGC
 106     if (ShenandoahVerifyObjectEquals) {
 107       ShouldNotReachHere();
 108     }
 109 #endif
 110     return obj() == o.obj();
 111   }
 112   bool operator==(void *p) const      { return obj() == p; }
 113   bool operator!=(const volatile oop o) const  {
 114 #if INCLUDE_SHENANDOAHGC
 115     if (ShenandoahVerifyObjectEquals) {
 116       ShouldNotReachHere();
 117     }
 118 #endif
 119     return obj() != o.obj();
 120   }
 121   bool operator!=(void *p) const      { return obj() != p; }
 122 
 123   // Assignment
 124   oop& operator=(const oop& o)                            { _o = o.obj(); return *this; }
 125   volatile oop& operator=(const oop& o) volatile          { _o = o.obj(); return *this; }
 126   volatile oop& operator=(const volatile oop& o) volatile { _o = o.obj(); return *this; }
 127 
 128   // Explict user conversions
 129   operator void* () const             { return (void *)obj(); }
 130 #ifndef SOLARIS
 131   operator void* () const volatile    { return (void *)obj(); }
 132 #endif
 133   operator HeapWord* () const         { return (HeapWord*)obj(); }
 134   operator oopDesc* () const volatile { return obj(); }
 135   operator intptr_t* () const         { return (intptr_t*)obj(); }
 136   operator PromotedObject* () const   { return (PromotedObject*)obj(); }
 137   operator markOop () const volatile  { return markOop(obj()); }
 138   operator address   () const         { return (address)obj(); }
 139 
 140   // from javaCalls.cpp


< prev index next >