Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/fieldDescriptor.cpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | 634b8615a6ba |
children | da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/runtime/fieldDescriptor.cpp Mon Aug 20 15:21:31 2012 +0200 +++ b/src/share/vm/runtime/fieldDescriptor.cpp Tue Aug 21 10:39:19 2012 +0200 @@ -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,24 @@ return instanceKlass::cast(_cp->pool_holder())->class_loader(); } +Symbol* fieldDescriptor::generic_signature() const { + if (!has_generic_signature()) { + return NULL; + } + + 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();