author | hseigel |
Fri, 15 Dec 2017 11:23:50 -0500 | |
changeset 48463 | 474cec233fb2 |
parent 48101 | 02f9be87cf5c |
child 49982 | 9042ffe5b7fe |
permissions | -rw-r--r-- |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
1 |
/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
3 |
* |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
4 |
* This code is free software; you can redistribute it and/or modify it |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
5 |
* under the terms of the GNU General Public License version 2 only, as |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
6 |
* published by the Free Software Foundation. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
7 |
* |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
8 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
9 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
10 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
11 |
* version 2 for more details (a copy is included in the LICENSE file that |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
12 |
* accompanied this code). |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
13 |
* |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License version |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
15 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
16 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
17 |
* |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
18 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
19 |
* or visit www.oracle.com if you need additional information or have any |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
20 |
* questions. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
21 |
* |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
22 |
*/ |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
23 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
24 |
#ifndef SHARE_VM_OOPS_INSTANCEMIRRORKLASS_INLINE_HPP |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
25 |
#define SHARE_VM_OOPS_INSTANCEMIRRORKLASS_INLINE_HPP |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
26 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
27 |
#include "classfile/javaClasses.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
28 |
#include "oops/instanceKlass.inline.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
29 |
#include "oops/instanceMirrorKlass.hpp" |
30880
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30150
diff
changeset
|
30 |
#include "oops/klass.hpp" |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
31 |
#include "oops/oop.inline.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
32 |
#include "utilities/debug.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
33 |
#include "utilities/globalDefinitions.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
34 |
#include "utilities/macros.hpp" |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
35 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
36 |
template <bool nv, typename T, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
37 |
void InstanceMirrorKlass::oop_oop_iterate_statics_specialized(oop obj, OopClosureType* closure) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
38 |
T* p = (T*)start_of_static_fields(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
39 |
T* const end = p + java_lang_Class::static_oop_field_count(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
40 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
41 |
for (; p < end; ++p) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
42 |
Devirtualizer<nv>::do_oop(closure, p); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
43 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
44 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
45 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
46 |
template <bool nv, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
47 |
void InstanceMirrorKlass::oop_oop_iterate_statics(oop obj, OopClosureType* closure) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
48 |
if (UseCompressedOops) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
49 |
oop_oop_iterate_statics_specialized<nv, narrowOop>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
50 |
} else { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
51 |
oop_oop_iterate_statics_specialized<nv, oop>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
52 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
53 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
54 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
55 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
56 |
void InstanceMirrorKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
57 |
InstanceKlass::oop_oop_iterate<nv>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
58 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
59 |
if (Devirtualizer<nv>::do_metadata(closure)) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
60 |
Klass* klass = java_lang_Class::as_Klass(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
61 |
// We'll get NULL for primitive mirrors. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
62 |
if (klass != NULL) { |
33611
9abd65805e19
8139203: Consistent naming for klass type predicates
coleenp
parents:
32606
diff
changeset
|
63 |
if (klass->is_instance_klass() && InstanceKlass::cast(klass)->is_anonymous()) { |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
64 |
// An anonymous class doesn't have its own class loader, so when handling |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
65 |
// the java mirror for an anonymous class we need to make sure its class |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
66 |
// loader data is claimed, this is done by calling do_cld explicitly. |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
67 |
// For non-anonymous classes the call to do_cld is made when the class |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
68 |
// loader itself is handled. |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
69 |
Devirtualizer<nv>::do_cld(closure, klass->class_loader_data()); |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
70 |
} else { |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
71 |
Devirtualizer<nv>::do_klass(closure, klass); |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
72 |
} |
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
73 |
} else { |
48101
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
74 |
// We would like to assert here (as below) that if klass has been NULL, then |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
75 |
// this has been a mirror for a primitive type that we do not need to follow |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
76 |
// as they are always strong roots. |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
77 |
// However, we might get across a klass that just changed during CMS concurrent |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
78 |
// marking if allocation occurred in the old generation. |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
79 |
// This is benign here, as we keep alive all CLDs that were loaded during the |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
80 |
// CMS concurrent phase in the class loading, i.e. they will be iterated over |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
81 |
// and kept alive during remark. |
02f9be87cf5c
8179244: Assert failed in instanceMirrorKlass.inline.hpp
tschatzl
parents:
47216
diff
changeset
|
82 |
// assert(java_lang_Class::is_primitive(obj), "Sanity check"); |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
83 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
84 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
85 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
86 |
oop_oop_iterate_statics<nv>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
87 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
88 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
89 |
#if INCLUDE_ALL_GCS |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
90 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
91 |
void InstanceMirrorKlass::oop_oop_iterate_reverse(oop obj, OopClosureType* closure) { |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
92 |
InstanceKlass::oop_oop_iterate_reverse<nv>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
93 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
94 |
InstanceMirrorKlass::oop_oop_iterate_statics<nv>(obj, closure); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
95 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
96 |
#endif |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
97 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
98 |
template <bool nv, typename T, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
99 |
void InstanceMirrorKlass::oop_oop_iterate_statics_specialized_bounded(oop obj, |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
100 |
OopClosureType* closure, |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
101 |
MemRegion mr) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
102 |
T* p = (T*)start_of_static_fields(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
103 |
T* end = p + java_lang_Class::static_oop_field_count(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
104 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
105 |
T* const l = (T*)mr.start(); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
106 |
T* const h = (T*)mr.end(); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
107 |
assert(mask_bits((intptr_t)l, sizeof(T)-1) == 0 && |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
108 |
mask_bits((intptr_t)h, sizeof(T)-1) == 0, |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
109 |
"bounded region must be properly aligned"); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
110 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
111 |
if (p < l) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
112 |
p = l; |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
113 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
114 |
if (end > h) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
115 |
end = h; |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
116 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
117 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
118 |
for (;p < end; ++p) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
119 |
Devirtualizer<nv>::do_oop(closure, p); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
120 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
121 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
122 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
123 |
template <bool nv, class OopClosureType> |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
124 |
void InstanceMirrorKlass::oop_oop_iterate_statics_bounded(oop obj, OopClosureType* closure, MemRegion mr) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
125 |
if (UseCompressedOops) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
126 |
oop_oop_iterate_statics_specialized_bounded<nv, narrowOop>(obj, closure, mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
127 |
} else { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
128 |
oop_oop_iterate_statics_specialized_bounded<nv, oop>(obj, closure, mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
129 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
130 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
131 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
132 |
template <bool nv, class OopClosureType> |
32606
fdaa30d06ada
8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents:
30880
diff
changeset
|
133 |
void InstanceMirrorKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) { |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
134 |
InstanceKlass::oop_oop_iterate_bounded<nv>(obj, closure, mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
135 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
136 |
if (Devirtualizer<nv>::do_metadata(closure)) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
137 |
if (mr.contains(obj)) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
138 |
Klass* klass = java_lang_Class::as_Klass(obj); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
139 |
// We'll get NULL for primitive mirrors. |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
140 |
if (klass != NULL) { |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
141 |
Devirtualizer<nv>::do_klass(closure, klass); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
142 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
143 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
144 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
145 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
146 |
oop_oop_iterate_statics_bounded<nv>(obj, closure, mr); |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
147 |
} |
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
148 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
149 |
#define ALL_INSTANCE_MIRROR_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \ |
30880
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30150
diff
changeset
|
150 |
OOP_OOP_ITERATE_DEFN( InstanceMirrorKlass, OopClosureType, nv_suffix) \ |
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30150
diff
changeset
|
151 |
OOP_OOP_ITERATE_DEFN_BOUNDED( InstanceMirrorKlass, OopClosureType, nv_suffix) \ |
efe35e08179f
8080746: Refactor oop iteration macros to be more general
sjohanss
parents:
30150
diff
changeset
|
152 |
OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceMirrorKlass, OopClosureType, nv_suffix) |
30150
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
153 |
|
d9c940aa42ef
8075955: Replace the macro based implementation of oop_oop_iterate with a template based solution
stefank
parents:
diff
changeset
|
154 |
#endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_INLINE_HPP |