comparison src/share/vm/runtime/fieldDescriptor.cpp @ 8031:927a311d00f9

8007320: NPG: move method annotations Summary: allocate method annotations and attach to ConstMethod if present Reviewed-by: dcubed, jiangli, sspitsyn, iklam
author coleenp
date Mon, 11 Feb 2013 14:06:22 -0500
parents 35431a769282
children 0f7ca53be929 b2e698d2276c
comparison
equal deleted inserted replaced
8030:f989aff6946f 8031:927a311d00f9
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
65 return md->at(index()); 65 return md->at(index());
66 } 66 }
67 67
68 AnnotationArray* fieldDescriptor::type_annotations() const { 68 AnnotationArray* fieldDescriptor::type_annotations() const {
69 InstanceKlass* ik = field_holder(); 69 InstanceKlass* ik = field_holder();
70 Annotations* type_annos = ik->type_annotations(); 70 Array<AnnotationArray*>* type_annos = ik->fields_type_annotations();
71 if (type_annos == NULL) 71 if (type_annos == NULL)
72 return NULL; 72 return NULL;
73 Array<AnnotationArray*>* md = type_annos->fields_annotations(); 73 return type_annos->at(index());
74 if (md == NULL)
75 return NULL;
76 return md->at(index());
77 } 74 }
78 75
79 constantTag fieldDescriptor::initial_value_tag() const { 76 constantTag fieldDescriptor::initial_value_tag() const {
80 return constants()->tag_at(initial_value_index()); 77 return constants()->tag_at(initial_value_index());
81 } 78 }