arrayKlass.hpp revision 1472
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
// arrayKlass is the abstract baseclass for all array classes
class arrayKlass: public Klass {
friend class VMStructs;
private:
int _dimension; // This is n'th-dimensional array.
int _vtable_len; // size of vtable for this klass
public:
// Testing operation
bool oop_is_array() const { return true; }
// Instance variables
int dimension() const { return _dimension; }
void set_higher_dimension(klassOop k) { oop_store_without_check((oop*) &_higher_dimension, (oop) k); }
void set_lower_dimension(klassOop k) { oop_store_without_check((oop*) &_lower_dimension, (oop) k); }
// Allocation profiling support
// offset of first element, including any padding for the sake of alignment
// type of elements (T_OBJECT for both oop arrays and array-arrays)
// Compiler/Interpreter offset
// Allocation
// Sizes points to the first dimension of the array, subsequent dimensions
// are always in higher memory. The callers of these set that up.
// Lookup operations
// Casting from klassOop
return (arrayKlass*) kp;
}
bool compute_is_subtype_of(klassOop k);
// Sizing
int object_size(int header_size) const;
bool object_is_parsable() const { return _vtable_len > 0; }
// Java vtable
int vtable_length() const { return _vtable_len; }
void set_vtable_length(int len) { assert(len == base_vtable_length(), "bad length"); _vtable_len = len; }
protected:
inline intptr_t* start_of_vtable() const;
public:
// Iterators
void array_klasses_do(void f(klassOop k));
void with_array_klasses_do(void f(klassOop k));
// Shared creation method
const Klass_vtbl& vtbl,
TRAPS);
// Return a handle.
public:
// jvm support
public:
// JVMTI support
jint jvmti_class_status() const;
#ifndef PRODUCT
public:
// Printing
#endif
public:
// Verification
};