mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7109878: The instanceKlass EnclosingMethhod attribute fields can be folded into the _inner_class field
Fold instanceKlass::_enclosing_method_class_index and instanceKlass::_enclosing_method_method_index into the instanceKlass::_inner_classes array. Reviewed-by: never, coleenp
This commit is contained in:
parent
db0efee3d4
commit
b9e6895d3a
11 changed files with 297 additions and 142 deletions
|
@ -297,16 +297,14 @@ public:
|
|||
|
||||
if (obj->blueprint()->oop_is_instanceKlass()) {
|
||||
instanceKlass* ik = instanceKlass::cast((klassOop)obj);
|
||||
typeArrayOop inner_classes = ik->inner_classes();
|
||||
if (inner_classes != NULL) {
|
||||
constantPoolOop constants = ik->constants();
|
||||
int n = inner_classes->length();
|
||||
for (int i = 0; i < n; i += instanceKlass::inner_class_next_offset) {
|
||||
int ioff = i + instanceKlass::inner_class_inner_name_offset;
|
||||
int index = inner_classes->ushort_at(ioff);
|
||||
if (index != 0) {
|
||||
_closure->do_symbol(constants->symbol_at_addr(index));
|
||||
}
|
||||
instanceKlassHandle ik_h((klassOop)obj);
|
||||
InnerClassesIterator iter(ik_h);
|
||||
constantPoolOop constants = ik->constants();
|
||||
for (; !iter.done(); iter.next()) {
|
||||
int index = iter.inner_name_index();
|
||||
|
||||
if (index != 0) {
|
||||
_closure->do_symbol(constants->symbol_at_addr(index));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue