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 package sun.jvm.hotspot.oops;
26
27 import java.util.*;
28 import sun.jvm.hotspot.debugger.*;
29 import sun.jvm.hotspot.memory.*;
30 import sun.jvm.hotspot.runtime.*;
31 import sun.jvm.hotspot.types.*;
32 import sun.jvm.hotspot.utilities.Observable;
33 import sun.jvm.hotspot.utilities.Observer;
34
35 // Array is an abstract superclass for TypeArray and ObjArray
36
37 public class Array extends Oop {
38 static {
39 VM.registerVMInitializedObserver(new Observer() {
40 public void update(Observable o, Object data) {
41 initialize(VM.getVM().getTypeDataBase());
42 }
43 });
44 }
45
46 Array(OopHandle handle, ObjectHeap heap) {
47 super(handle, heap);
48 }
49
50 private static void initialize(TypeDataBase db) throws WrongTypeException {
51 Type type = db.lookupType("arrayOopDesc");
52 typeSize = (int)type.getSize();
53 }
54
55 // Size of the arrayOopDesc
|
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 package sun.jvm.hotspot.oops;
26
27 import java.util.*;
28 import sun.jvm.hotspot.debugger.*;
29 import sun.jvm.hotspot.memory.*;
30 import sun.jvm.hotspot.runtime.*;
31 import sun.jvm.hotspot.types.*;
32 import sun.jvm.hotspot.utilities.Observable;
33 import sun.jvm.hotspot.utilities.Observer;
34
35 // Array is an abstract superclass for TypeArray, ObjArray, and FlatArray
36
37 public class Array extends Oop {
38 static {
39 VM.registerVMInitializedObserver(new Observer() {
40 public void update(Observable o, Object data) {
41 initialize(VM.getVM().getTypeDataBase());
42 }
43 });
44 }
45
46 Array(OopHandle handle, ObjectHeap heap) {
47 super(handle, heap);
48 }
49
50 private static void initialize(TypeDataBase db) throws WrongTypeException {
51 Type type = db.lookupType("arrayOopDesc");
52 typeSize = (int)type.getSize();
53 }
54
55 // Size of the arrayOopDesc
|