mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -591,14 +591,11 @@ bool Reflection::is_same_package_member(klassOop class1, klassOop class2, TRAPS)
|
|||
// Caller is responsible for figuring out in advance which case must be true.
|
||||
void Reflection::check_for_inner_class(instanceKlassHandle outer, instanceKlassHandle inner,
|
||||
bool inner_is_member, TRAPS) {
|
||||
const int inner_class_info_index = 0;
|
||||
const int outer_class_info_index = 1;
|
||||
|
||||
typeArrayHandle icls (THREAD, outer->inner_classes());
|
||||
InnerClassesIterator iter(outer);
|
||||
constantPoolHandle cp (THREAD, outer->constants());
|
||||
for(int i = 0; i < icls->length(); i += 4) {
|
||||
int ioff = icls->ushort_at(i + inner_class_info_index);
|
||||
int ooff = icls->ushort_at(i + outer_class_info_index);
|
||||
for (; !iter.done(); iter.next()) {
|
||||
int ioff = iter.inner_class_info_index();
|
||||
int ooff = iter.outer_class_info_index();
|
||||
|
||||
if (inner_is_member && ioff != 0 && ooff != 0) {
|
||||
klassOop o = cp->klass_at(ooff, CHECK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue