< prev index next >

src/share/vm/oops/constantPool.hpp

Print this page




  30 #include "oops/objArrayOop.hpp"
  31 #include "oops/symbol.hpp"
  32 #include "oops/typeArrayOop.hpp"
  33 #include "runtime/handles.hpp"
  34 #include "utilities/constantTag.hpp"
  35 #ifdef TARGET_ARCH_x86
  36 # include "bytes_x86.hpp"
  37 #endif
  38 #ifdef TARGET_ARCH_sparc
  39 # include "bytes_sparc.hpp"
  40 #endif
  41 #ifdef TARGET_ARCH_zero
  42 # include "bytes_zero.hpp"
  43 #endif
  44 #ifdef TARGET_ARCH_arm
  45 # include "bytes_arm.hpp"
  46 #endif
  47 #ifdef TARGET_ARCH_ppc
  48 # include "bytes_ppc.hpp"
  49 #endif



  50 
  51 // A constantPool is an array containing class constants as described in the
  52 // class file.
  53 //
  54 // Most of the constant pool entries are written during class parsing, which
  55 // is safe.  For klass types, the constant pool entry is
  56 // modified when the entry is resolved.  If a klass constant pool
  57 // entry is read without a lock, only the resolved state guarantees that
  58 // the entry in the constant pool is a klass object and not a Symbol*.
  59 
  60 class SymbolHashMap;
  61 
  62 class CPSlot VALUE_OBJ_CLASS_SPEC {
  63   intptr_t _ptr;
  64  public:
  65   CPSlot(intptr_t ptr): _ptr(ptr) {}
  66   CPSlot(Klass* ptr): _ptr((intptr_t)ptr) {}
  67   CPSlot(Symbol* ptr): _ptr((intptr_t)ptr | 1) {}
  68 
  69   intptr_t value()   { return _ptr; }




  30 #include "oops/objArrayOop.hpp"
  31 #include "oops/symbol.hpp"
  32 #include "oops/typeArrayOop.hpp"
  33 #include "runtime/handles.hpp"
  34 #include "utilities/constantTag.hpp"
  35 #ifdef TARGET_ARCH_x86
  36 # include "bytes_x86.hpp"
  37 #endif
  38 #ifdef TARGET_ARCH_sparc
  39 # include "bytes_sparc.hpp"
  40 #endif
  41 #ifdef TARGET_ARCH_zero
  42 # include "bytes_zero.hpp"
  43 #endif
  44 #ifdef TARGET_ARCH_arm
  45 # include "bytes_arm.hpp"
  46 #endif
  47 #ifdef TARGET_ARCH_ppc
  48 # include "bytes_ppc.hpp"
  49 #endif
  50 #ifdef TARGET_ARCH_aarch32
  51 # include "bytes_aarch32.hpp"
  52 #endif
  53 
  54 // A constantPool is an array containing class constants as described in the
  55 // class file.
  56 //
  57 // Most of the constant pool entries are written during class parsing, which
  58 // is safe.  For klass types, the constant pool entry is
  59 // modified when the entry is resolved.  If a klass constant pool
  60 // entry is read without a lock, only the resolved state guarantees that
  61 // the entry in the constant pool is a klass object and not a Symbol*.
  62 
  63 class SymbolHashMap;
  64 
  65 class CPSlot VALUE_OBJ_CLASS_SPEC {
  66   intptr_t _ptr;
  67  public:
  68   CPSlot(intptr_t ptr): _ptr(ptr) {}
  69   CPSlot(Klass* ptr): _ptr((intptr_t)ptr) {}
  70   CPSlot(Symbol* ptr): _ptr((intptr_t)ptr | 1) {}
  71 
  72   intptr_t value()   { return _ptr; }


< prev index next >