author | coleenp |
Wed, 24 Jul 2019 10:22:11 -0400 | |
changeset 57511 | 00ae3b739184 |
parent 54347 | 235883996bc7 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
53152 | 2 |
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4571
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4571
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4571
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "classfile/javaClasses.hpp" |
|
54347
235883996bc7
8221698: Remove redundant includes from popular header files
iklam
parents:
53152
diff
changeset
|
27 |
#include "classfile/moduleEntry.hpp" |
7397 | 28 |
#include "classfile/systemDictionary.hpp" |
29 |
#include "classfile/vmSymbols.hpp" |
|
30764 | 30 |
#include "gc/shared/collectedHeap.inline.hpp" |
7397 | 31 |
#include "jvmtifiles/jvmti.h" |
46746
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
32 |
#include "memory/metaspaceClosure.hpp" |
37248 | 33 |
#include "memory/resourceArea.hpp" |
49359
59f6547e151f
8199264: Remove universe.inline.hpp to simplify include dependencies
stefank
parents:
47216
diff
changeset
|
34 |
#include "memory/universe.hpp" |
7397 | 35 |
#include "oops/arrayKlass.hpp" |
36 |
#include "oops/arrayOop.hpp" |
|
37 |
#include "oops/instanceKlass.hpp" |
|
38 |
#include "oops/objArrayOop.hpp" |
|
39 |
#include "oops/oop.inline.hpp" |
|
49393 | 40 |
#include "runtime/handles.inline.hpp" |
1 | 41 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
42 |
int ArrayKlass::static_size(int header_size) { |
1 | 43 |
// size of an array klass object |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
44 |
assert(header_size <= InstanceKlass::header_size(), "bad header size"); |
1 | 45 |
// If this assert fails, see comments in base_create_array_klass. |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
46 |
header_size = InstanceKlass::header_size(); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
47 |
int vtable_len = Universe::base_vtable_size(); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
48 |
int size = header_size + vtable_len; |
35898
ddc274f0052f
8145628: hotspot metadata classes shouldn't use HeapWordSize or heap related macros like align_object_size
coleenp
parents:
35847
diff
changeset
|
49 |
return align_metadata_size(size); |
1 | 50 |
} |
51 |
||
52 |
||
51329
9c68699bebe5
8208999: Some use of Klass* should be replaced by InstanceKlass*
iklam
parents:
51096
diff
changeset
|
53 |
InstanceKlass* ArrayKlass::java_super() const { |
1 | 54 |
if (super() == NULL) return NULL; // bootstrap case |
55 |
// Array klasses have primary supertypes which are not reported to Java. |
|
56 |
// Example super chain: String[][] -> Object[][] -> Object[] -> Object |
|
4571 | 57 |
return SystemDictionary::Object_klass(); |
1 | 58 |
} |
59 |
||
60 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
61 |
oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) { |
1 | 62 |
ShouldNotReachHere(); |
63 |
return NULL; |
|
64 |
} |
|
65 |
||
27020 | 66 |
// find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined |
67 |
Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { |
|
68 |
// There are no fields in an array klass but look to the super class (Object) |
|
69 |
assert(super(), "super klass must be present"); |
|
70 |
return super()->find_field(name, sig, fd); |
|
71 |
} |
|
72 |
||
34666 | 73 |
Method* ArrayKlass::uncached_lookup_method(const Symbol* name, |
74 |
const Symbol* signature, |
|
50735
2f2af62dfac7
8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents:
50304
diff
changeset
|
75 |
OverpassLookupMode overpass_mode, |
2f2af62dfac7
8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents:
50304
diff
changeset
|
76 |
PrivateLookupMode private_mode) const { |
1 | 77 |
// There are no methods in an array klass but the super class (Object) has some |
78 |
assert(super(), "super klass must be present"); |
|
28731
f7339cba0a6a
8067480: Crash in klassItable::initialize_itable_for_interface when running vm.runtime.defmeth.StaticMethodsTest.
lfoltan
parents:
27020
diff
changeset
|
79 |
// Always ignore overpass methods in superclasses, although technically the |
f7339cba0a6a
8067480: Crash in klassItable::initialize_itable_for_interface when running vm.runtime.defmeth.StaticMethodsTest.
lfoltan
parents:
27020
diff
changeset
|
80 |
// super klass of an array, (j.l.Object) should not have |
f7339cba0a6a
8067480: Crash in klassItable::initialize_itable_for_interface when running vm.runtime.defmeth.StaticMethodsTest.
lfoltan
parents:
27020
diff
changeset
|
81 |
// any overpass methods present. |
50735
2f2af62dfac7
8010319: Implementation of JEP 181: Nest-Based Access Control
dholmes
parents:
50304
diff
changeset
|
82 |
return super()->uncached_lookup_method(name, signature, Klass::skip_overpass, private_mode); |
1 | 83 |
} |
84 |
||
50752 | 85 |
ArrayKlass::ArrayKlass(Symbol* name, KlassID id) : |
86 |
Klass(id), |
|
34666 | 87 |
_dimension(1), |
88 |
_higher_dimension(NULL), |
|
35899 | 89 |
_lower_dimension(NULL) { |
90 |
// Arrays don't add any new methods, so their vtable is the same size as |
|
91 |
// the vtable of klass Object. |
|
92 |
set_vtable_length(Universe::base_vtable_size()); |
|
34666 | 93 |
set_name(name); |
51329
9c68699bebe5
8208999: Some use of Klass* should be replaced by InstanceKlass*
iklam
parents:
51096
diff
changeset
|
94 |
set_super(Universe::is_bootstrapping() ? NULL : SystemDictionary::Object_klass()); |
34666 | 95 |
set_layout_helper(Klass::_lh_neutral_value); |
96 |
set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5) |
|
50113 | 97 |
JFR_ONLY(INIT_ID(this);) |
1 | 98 |
} |
99 |
||
100 |
||
101 |
// Initialization of vtables and mirror object is done separatly from base_create_array_klass, |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
102 |
// since a GC can happen. At this point all instance variables of the ArrayKlass must be setup. |
46329
53ccc37bda19
8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents:
46271
diff
changeset
|
103 |
void ArrayKlass::complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module_entry, TRAPS) { |
49948
ff8dbb56740a
8200466: Revisit the setting of _transitive_interfaces in InstanceKlass
ccheung
parents:
49594
diff
changeset
|
104 |
k->initialize_supers(super_klass, NULL, CHECK); |
46408
70aab0c2ea8b
8178350: klassVtable and klassItable should be ValueObj
iklam
parents:
46329
diff
changeset
|
105 |
k->vtable().initialize_vtable(false, CHECK); |
36508 | 106 |
|
107 |
// During bootstrapping, before java.base is defined, the module_entry may not be present yet. |
|
108 |
// These classes will be put on a fixup list and their module fields will be patched once |
|
109 |
// java.base is defined. |
|
110 |
assert((module_entry != NULL) || ((module_entry == NULL) && !ModuleEntryTable::javabase_defined()), |
|
42636
aafc434ba580
8169734: Update uses of string "java.base" to macro
rprotacio
parents:
37248
diff
changeset
|
111 |
"module entry not available post " JAVA_BASE_NAME " definition"); |
46773
fb17cc9a6847
8185717: Make ModuleEntry->module() return an oop not a jobject
hseigel
parents:
46746
diff
changeset
|
112 |
oop module = (module_entry != NULL) ? module_entry->module() : (oop)NULL; |
46271
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
42639
diff
changeset
|
113 |
java_lang_Class::create_mirror(k, Handle(THREAD, k->class_loader()), Handle(THREAD, module), Handle(), CHECK); |
1 | 114 |
} |
115 |
||
49948
ff8dbb56740a
8200466: Revisit the setting of _transitive_interfaces in InstanceKlass
ccheung
parents:
49594
diff
changeset
|
116 |
GrowableArray<Klass*>* ArrayKlass::compute_secondary_supers(int num_extra_slots, |
51329
9c68699bebe5
8208999: Some use of Klass* should be replaced by InstanceKlass*
iklam
parents:
51096
diff
changeset
|
117 |
Array<InstanceKlass*>* transitive_interfaces) { |
1 | 118 |
// interfaces = { cloneable_klass, serializable_klass }; |
119 |
assert(num_extra_slots == 0, "sanity of primitive array type"); |
|
49948
ff8dbb56740a
8200466: Revisit the setting of _transitive_interfaces in InstanceKlass
ccheung
parents:
49594
diff
changeset
|
120 |
assert(transitive_interfaces == NULL, "sanity"); |
1 | 121 |
// Must share this for correct bootstrapping! |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
122 |
set_secondary_supers(Universe::the_array_interfaces_array()); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
123 |
return NULL; |
1 | 124 |
} |
125 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
126 |
objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) { |
52033
d6aa9ea2405d
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
dnsimon
parents:
51329
diff
changeset
|
127 |
check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_0); |
1 | 128 |
int size = objArrayOopDesc::object_size(length); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
129 |
Klass* k = array_klass(n+dimension(), CHECK_0); |
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
130 |
ArrayKlass* ak = ArrayKlass::cast(k); |
50882
80abf702eed8
8205683: Refactor heap allocation to separate concerns
eosterlund
parents:
50752
diff
changeset
|
131 |
objArrayOop o = (objArrayOop)Universe::heap()->array_allocate(ak, size, length, |
80abf702eed8
8205683: Refactor heap allocation to separate concerns
eosterlund
parents:
50752
diff
changeset
|
132 |
/* do_zero */ true, CHECK_0); |
1 | 133 |
// initialization to NULL not necessary, area already cleared |
134 |
return o; |
|
135 |
} |
|
136 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
137 |
void ArrayKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
138 |
Klass* k = this; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
139 |
// Iterate over this array klass and all higher dimensions |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
140 |
while (k != NULL) { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
141 |
f(k, CHECK); |
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
142 |
k = ArrayKlass::cast(k)->higher_dimension(); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
143 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
144 |
} |
1 | 145 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
146 |
void ArrayKlass::array_klasses_do(void f(Klass* k)) { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
147 |
Klass* k = this; |
1 | 148 |
// Iterate over this array klass and all higher dimensions |
149 |
while (k != NULL) { |
|
150 |
f(k); |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
151 |
k = ArrayKlass::cast(k)->higher_dimension(); |
1 | 152 |
} |
153 |
} |
|
154 |
||
155 |
// JVM support |
|
156 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
157 |
jint ArrayKlass::compute_modifier_flags(TRAPS) const { |
1 | 158 |
return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC; |
159 |
} |
|
160 |
||
161 |
// JVMTI support |
|
162 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
163 |
jint ArrayKlass::jvmti_class_status() const { |
1 | 164 |
return JVMTI_CLASS_STATUS_ARRAY; |
165 |
} |
|
166 |
||
46746
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
167 |
void ArrayKlass::metaspace_pointers_do(MetaspaceClosure* it) { |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
168 |
Klass::metaspace_pointers_do(it); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
169 |
|
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
170 |
ResourceMark rm; |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
171 |
log_trace(cds)("Iter(ArrayKlass): %p (%s)", this, external_name()); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
172 |
|
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
173 |
// need to cast away volatile |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
174 |
it->push((Klass**)&_higher_dimension); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
175 |
it->push((Klass**)&_lower_dimension); |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
176 |
} |
ea379ebb9447
8072061: Automatically determine optimal sizes for the CDS regions
iklam
parents:
46408
diff
changeset
|
177 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
178 |
void ArrayKlass::remove_unshareable_info() { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
179 |
Klass::remove_unshareable_info(); |
47103
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
180 |
if (_higher_dimension != NULL) { |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
181 |
ArrayKlass *ak = ArrayKlass::cast(higher_dimension()); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
182 |
ak->remove_unshareable_info(); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
183 |
} |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
184 |
} |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
185 |
|
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
186 |
void ArrayKlass::remove_java_mirror() { |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
187 |
Klass::remove_java_mirror(); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
188 |
if (_higher_dimension != NULL) { |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
189 |
ArrayKlass *ak = ArrayKlass::cast(higher_dimension()); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
190 |
ak->remove_java_mirror(); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
191 |
} |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
192 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
193 |
|
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
25326
diff
changeset
|
194 |
void ArrayKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) { |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
25326
diff
changeset
|
195 |
assert(loader_data == ClassLoaderData::the_null_class_loader_data(), "array classes belong to null loader"); |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
25326
diff
changeset
|
196 |
Klass::restore_unshareable_info(loader_data, protection_domain, CHECK); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
197 |
// Klass recreates the component mirror also |
47103
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
198 |
|
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
199 |
if (_higher_dimension != NULL) { |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
200 |
ArrayKlass *ak = ArrayKlass::cast(higher_dimension()); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
201 |
ak->restore_unshareable_info(loader_data, protection_domain, CHECK); |
a993ec29ec75
8186842: Use Java class loaders for creating the CDS archive
ccheung
parents:
46773
diff
changeset
|
202 |
} |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
203 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
204 |
|
1 | 205 |
// Printing |
206 |
||
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
207 |
void ArrayKlass::print_on(outputStream* st) const { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
208 |
assert(is_klass(), "must be klass"); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
209 |
Klass::print_on(st); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
210 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
211 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
212 |
void ArrayKlass::print_value_on(outputStream* st) const { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
213 |
assert(is_klass(), "must be klass"); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
214 |
for(int index = 0; index < dimension(); index++) { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
215 |
st->print("[]"); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
216 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
217 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
218 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
219 |
void ArrayKlass::oop_print_on(oop obj, outputStream* st) { |
1 | 220 |
assert(obj->is_array(), "must be array"); |
221 |
Klass::oop_print_on(obj, st); |
|
222 |
st->print_cr(" - length: %d", arrayOop(obj)->length()); |
|
223 |
} |
|
224 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
225 |
|
1 | 226 |
// Verification |
227 |
||
22794
f1c014ad3754
8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on
coleenp
parents:
22234
diff
changeset
|
228 |
void ArrayKlass::verify_on(outputStream* st) { |
f1c014ad3754
8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on
coleenp
parents:
22234
diff
changeset
|
229 |
Klass::verify_on(st); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
230 |
} |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12114
diff
changeset
|
231 |
|
13952
e3cf184080bc
8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
coleenp
parents:
13728
diff
changeset
|
232 |
void ArrayKlass::oop_verify_on(oop obj, outputStream* st) { |
1 | 233 |
guarantee(obj->is_array(), "must be array"); |
234 |
arrayOop a = arrayOop(obj); |
|
235 |
guarantee(a->length() >= 0, "array with negative length?"); |
|
236 |
} |