mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
7168280: Eliminate the generic signature index slot from field array for field without generic signature
Only allocate the generic signature index slot in the field array for field with generic signature attribute. Reviewed-by: coleenp, dlong
This commit is contained in:
parent
57692966b7
commit
31e63d5a3a
12 changed files with 199 additions and 53 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/fieldStreams.hpp"
|
||||
#include "runtime/fieldDescriptor.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/signature.hpp"
|
||||
|
@ -37,6 +38,20 @@ oop fieldDescriptor::loader() const {
|
|||
return instanceKlass::cast(_cp->pool_holder())->class_loader();
|
||||
}
|
||||
|
||||
Symbol* fieldDescriptor::generic_signature() const {
|
||||
int idx = 0;
|
||||
instanceKlass* ik = instanceKlass::cast(field_holder());
|
||||
for (AllFieldStream fs(ik); !fs.done(); fs.next()) {
|
||||
if (idx == _index) {
|
||||
return fs.generic_signature();
|
||||
} else {
|
||||
idx ++;
|
||||
}
|
||||
}
|
||||
assert(false, "should never happen");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typeArrayOop fieldDescriptor::annotations() const {
|
||||
instanceKlass* ik = instanceKlass::cast(field_holder());
|
||||
objArrayOop md = ik->fields_annotations();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue