Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/classFileParser.hpp @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | edb5ab0f3fe5 |
children | f0d759a6a230 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
14421:3068270ba476 | 14422:2b8e28fdf503 |
---|---|
123 _method_ForceInline, | 123 _method_ForceInline, |
124 _method_DontInline, | 124 _method_DontInline, |
125 _method_LambdaForm_Compiled, | 125 _method_LambdaForm_Compiled, |
126 _method_LambdaForm_Hidden, | 126 _method_LambdaForm_Hidden, |
127 _sun_misc_Contended, | 127 _sun_misc_Contended, |
128 _field_Stable, | |
128 _annotation_LIMIT | 129 _annotation_LIMIT |
129 }; | 130 }; |
130 const Location _location; | 131 const Location _location; |
131 int _annotations_present; | 132 int _annotations_present; |
132 u2 _contended_group; | 133 u2 _contended_group; |
141 // Set the annotation name: | 142 // Set the annotation name: |
142 void set_annotation(ID id) { | 143 void set_annotation(ID id) { |
143 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob"); | 144 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob"); |
144 _annotations_present |= nth_bit((int)id); | 145 _annotations_present |= nth_bit((int)id); |
145 } | 146 } |
147 | |
148 void remove_annotation(ID id) { | |
149 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob"); | |
150 _annotations_present &= ~nth_bit((int)id); | |
151 } | |
152 | |
146 // Report if the annotation is present. | 153 // Report if the annotation is present. |
147 bool has_any_annotations() { return _annotations_present != 0; } | 154 bool has_any_annotations() const { return _annotations_present != 0; } |
148 bool has_annotation(ID id) { return (nth_bit((int)id) & _annotations_present) != 0; } | 155 bool has_annotation(ID id) const { return (nth_bit((int)id) & _annotations_present) != 0; } |
149 | 156 |
150 void set_contended_group(u2 group) { _contended_group = group; } | 157 void set_contended_group(u2 group) { _contended_group = group; } |
151 u2 contended_group() { return _contended_group; } | 158 u2 contended_group() const { return _contended_group; } |
152 | 159 |
153 bool is_contended() { return has_annotation(_sun_misc_Contended); } | 160 bool is_contended() const { return has_annotation(_sun_misc_Contended); } |
161 | |
162 void set_stable(bool stable) { set_annotation(_field_Stable); } | |
163 bool is_stable() const { return has_annotation(_field_Stable); } | |
154 }; | 164 }; |
155 | 165 |
156 // This class also doubles as a holder for metadata cleanup. | 166 // This class also doubles as a holder for metadata cleanup. |
157 class FieldAnnotationCollector: public AnnotationCollector { | 167 class FieldAnnotationCollector: public AnnotationCollector { |
158 ClassLoaderData* _loader_data; | 168 ClassLoaderData* _loader_data; |