1 /* |
1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
47 Type type = db.lookupType("ArrayKlass"); |
47 Type type = db.lookupType("ArrayKlass"); |
48 dimension = new CIntField(type.getCIntegerField("_dimension"), 0); |
48 dimension = new CIntField(type.getCIntegerField("_dimension"), 0); |
49 higherDimension = new MetadataField(type.getAddressField("_higher_dimension"), 0); |
49 higherDimension = new MetadataField(type.getAddressField("_higher_dimension"), 0); |
50 lowerDimension = new MetadataField(type.getAddressField("_lower_dimension"), 0); |
50 lowerDimension = new MetadataField(type.getAddressField("_lower_dimension"), 0); |
51 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0); |
51 vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0); |
52 componentMirror = new OopField(type.getOopField("_component_mirror"), 0); |
|
53 javaLangCloneableName = null; |
52 javaLangCloneableName = null; |
54 javaLangObjectName = null; |
53 javaLangObjectName = null; |
55 javaIoSerializableName = null; |
54 javaIoSerializableName = null; |
56 } |
55 } |
57 |
56 |
61 |
60 |
62 private static CIntField dimension; |
61 private static CIntField dimension; |
63 private static MetadataField higherDimension; |
62 private static MetadataField higherDimension; |
64 private static MetadataField lowerDimension; |
63 private static MetadataField lowerDimension; |
65 private static CIntField vtableLen; |
64 private static CIntField vtableLen; |
66 private static OopField componentMirror; |
|
67 |
65 |
68 public Klass getJavaSuper() { |
66 public Klass getJavaSuper() { |
69 SystemDictionary sysDict = VM.getVM().getSystemDictionary(); |
67 SystemDictionary sysDict = VM.getVM().getSystemDictionary(); |
70 return sysDict.getObjectKlass(); |
68 return sysDict.getObjectKlass(); |
71 } |
69 } |
72 |
70 |
73 public long getDimension() { return dimension.getValue(this); } |
71 public long getDimension() { return dimension.getValue(this); } |
74 public Klass getHigherDimension() { return (Klass) higherDimension.getValue(this); } |
72 public Klass getHigherDimension() { return (Klass) higherDimension.getValue(this); } |
75 public Klass getLowerDimension() { return (Klass) lowerDimension.getValue(this); } |
73 public Klass getLowerDimension() { return (Klass) lowerDimension.getValue(this); } |
76 public long getVtableLen() { return vtableLen.getValue(this); } |
74 public long getVtableLen() { return vtableLen.getValue(this); } |
77 public Oop getComponentMirror() { return componentMirror.getValue(this); } |
|
78 |
75 |
79 // constant class names - javaLangCloneable, javaIoSerializable, javaLangObject |
76 // constant class names - javaLangCloneable, javaIoSerializable, javaLangObject |
80 // Initialized lazily to avoid initialization ordering dependencies between ArrayKlass and SymbolTable |
77 // Initialized lazily to avoid initialization ordering dependencies between ArrayKlass and SymbolTable |
81 private static Symbol javaLangCloneableName; |
78 private static Symbol javaLangCloneableName; |
82 private static Symbol javaLangObjectName; |
79 private static Symbol javaLangObjectName; |
142 super.iterateFields(visitor); |
139 super.iterateFields(visitor); |
143 visitor.doCInt(dimension, true); |
140 visitor.doCInt(dimension, true); |
144 visitor.doMetadata(higherDimension, true); |
141 visitor.doMetadata(higherDimension, true); |
145 visitor.doMetadata(lowerDimension, true); |
142 visitor.doMetadata(lowerDimension, true); |
146 visitor.doCInt(vtableLen, true); |
143 visitor.doCInt(vtableLen, true); |
147 visitor.doOop(componentMirror, true); |
|
148 } |
144 } |
149 } |
145 } |