arrayKlass.cpp revision 3322
3322N/A * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A // size of an array klass object 0N/A // If this assert fails, see comments in base_create_array_klass. 0N/A // Array klasses have primary supertypes which are not reported to Java. 0N/A // Example super chain: String[][] -> Object[][] -> Object[] -> Object 0N/A // There are no methods in an array klass but the super class (Object) has some 0N/A // Note: because the Java vtable must start at the same offset in all klasses, 0N/A // we must insert filler fields into arrayKlass to make it the same size as instanceKlass. 0N/A // If this assert fails, add filler to instanceKlass to make it bigger. 0N/A "array klasses must be same size as instanceKlass");
0N/A // Arrays don't add any new methods, so their vtable is the same size as 0N/A // the vtable of klass Object. 0N/A // No safepoint should be possible until the handle's 0N/A // target below becomes parsable 0N/A // Make sure size calculation is right 0N/A// Initialization of vtables and mirror object is done separatly from base_create_array_klass, 0N/A// since a GC can happen. At this point all instance variables of the arrayKlass must be setup. 0N/A // interfaces = { cloneable_klass, serializable_klass }; 0N/A // Must share this for correct bootstrapping! 0N/A // An array is a subtype of Serializable, Clonable, and Object 0N/A // all vtables start at the same place, that's why we use instanceKlass::header_size here 0N/A // initialization to NULL not necessary, area already cleared 0N/A // Iterate over this array klass and all higher dimensions