hotspot/src/share/vm/oops/cpCacheOop.hpp
Print this page
rev 611 : Merge
@@ -1,10 +1,10 @@
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)cpCacheOop.hpp 1.74 07/05/29 09:44:19 JVM"
#endif
/*
- * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -287,16 +287,21 @@
// A constant pool cache is a runtime data structure set aside to a constant pool. The cache
// holds interpreter runtime information for all field access and invoke bytecodes. The cache
// is created and initialized before a class is actively used (i.e., initialized), the indivi-
// dual cache entries are filled at resolution (i.e., "link") time (see also: rewriter.*).
-class constantPoolCacheOopDesc: public arrayOopDesc {
+class constantPoolCacheOopDesc: public oopDesc {
friend class VMStructs;
private:
+ int _length;
constantPoolOop _constant_pool; // the corresponding constant pool
// Sizing
+ debug_only(friend class ClassVerifier;)
+ int length() const { return _length; }
+ void set_length(int length) { _length = length; }
+
static int header_size() { return sizeof(constantPoolCacheOopDesc) / HeapWordSize; }
static int object_size(int length) { return align_object_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); }
int object_size() { return object_size(length()); }
// Helpers