< prev index next >

src/share/vm/oops/oop.inline.hpp

Print this page




  40 #include "oops/oop.hpp"
  41 #include "runtime/atomic.inline.hpp"
  42 #include "runtime/orderAccess.inline.hpp"
  43 #include "runtime/os.hpp"
  44 #include "utilities/macros.hpp"
  45 #ifdef TARGET_ARCH_x86
  46 # include "bytes_x86.hpp"
  47 #endif
  48 #ifdef TARGET_ARCH_sparc
  49 # include "bytes_sparc.hpp"
  50 #endif
  51 #ifdef TARGET_ARCH_zero
  52 # include "bytes_zero.hpp"
  53 #endif
  54 #ifdef TARGET_ARCH_arm
  55 # include "bytes_arm.hpp"
  56 #endif
  57 #ifdef TARGET_ARCH_ppc
  58 # include "bytes_ppc.hpp"
  59 #endif



  60 
  61 // Implementation of all inlined member functions defined in oop.hpp
  62 // We need a separate file to avoid circular references
  63 
  64 inline void oopDesc::release_set_mark(markOop m) {
  65   OrderAccess::release_store_ptr(&_mark, m);
  66 }
  67 
  68 inline markOop oopDesc::cas_set_mark(markOop new_mark, markOop old_mark) {
  69   return (markOop) Atomic::cmpxchg_ptr(new_mark, &_mark, old_mark);
  70 }
  71 
  72 inline Klass* oopDesc::klass() const {
  73   if (UseCompressedClassPointers) {
  74     return Klass::decode_klass_not_null(_metadata._compressed_klass);
  75   } else {
  76     return _metadata._klass;
  77   }
  78 }
  79 




  40 #include "oops/oop.hpp"
  41 #include "runtime/atomic.inline.hpp"
  42 #include "runtime/orderAccess.inline.hpp"
  43 #include "runtime/os.hpp"
  44 #include "utilities/macros.hpp"
  45 #ifdef TARGET_ARCH_x86
  46 # include "bytes_x86.hpp"
  47 #endif
  48 #ifdef TARGET_ARCH_sparc
  49 # include "bytes_sparc.hpp"
  50 #endif
  51 #ifdef TARGET_ARCH_zero
  52 # include "bytes_zero.hpp"
  53 #endif
  54 #ifdef TARGET_ARCH_arm
  55 # include "bytes_arm.hpp"
  56 #endif
  57 #ifdef TARGET_ARCH_ppc
  58 # include "bytes_ppc.hpp"
  59 #endif
  60 #ifdef TARGET_ARCH_aarch32
  61 # include "bytes_aarch32.hpp"
  62 #endif
  63 
  64 // Implementation of all inlined member functions defined in oop.hpp
  65 // We need a separate file to avoid circular references
  66 
  67 inline void oopDesc::release_set_mark(markOop m) {
  68   OrderAccess::release_store_ptr(&_mark, m);
  69 }
  70 
  71 inline markOop oopDesc::cas_set_mark(markOop new_mark, markOop old_mark) {
  72   return (markOop) Atomic::cmpxchg_ptr(new_mark, &_mark, old_mark);
  73 }
  74 
  75 inline Klass* oopDesc::klass() const {
  76   if (UseCompressedClassPointers) {
  77     return Klass::decode_klass_not_null(_metadata._compressed_klass);
  78   } else {
  79     return _metadata._klass;
  80   }
  81 }
  82 


< prev index next >