src/share/vm/oops/constantPool.hpp

Print this page
rev 6670 : 8049325: Introduce and clean up umbrella headers for the files in the cpu subdirectories.
Reviewed-by: lfoltan, coleenp, dholmes


  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
  26 #define SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
  27 
  28 #include "oops/arrayOop.hpp"
  29 #include "oops/cpCache.hpp"
  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; }




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
  26 #define SHARE_VM_OOPS_CONSTANTPOOLOOP_HPP
  27 
  28 #include "oops/arrayOop.hpp"
  29 #include "oops/cpCache.hpp"
  30 #include "oops/objArrayOop.hpp"
  31 #include "oops/symbol.hpp"
  32 #include "oops/typeArrayOop.hpp"
  33 #include "runtime/handles.hpp"
  34 #include "utilities/bytes.hpp"
  35 #include "utilities/constantTag.hpp"















  36 
  37 // A ConstantPool is an array containing class constants as described in the
  38 // class file.
  39 //
  40 // Most of the constant pool entries are written during class parsing, which
  41 // is safe.  For klass types, the constant pool entry is
  42 // modified when the entry is resolved.  If a klass constant pool
  43 // entry is read without a lock, only the resolved state guarantees that
  44 // the entry in the constant pool is a klass object and not a Symbol*.
  45 
  46 class SymbolHashMap;
  47 
  48 class CPSlot VALUE_OBJ_CLASS_SPEC {
  49   intptr_t _ptr;
  50  public:
  51   CPSlot(intptr_t ptr): _ptr(ptr) {}
  52   CPSlot(Klass* ptr): _ptr((intptr_t)ptr) {}
  53   CPSlot(Symbol* ptr): _ptr((intptr_t)ptr | 1) {}
  54 
  55   intptr_t value()   { return _ptr; }