1075 _method_DontInline,
1076 _method_InjectedProfile,
1077 _method_LambdaForm_Compiled,
1078 _method_Hidden,
1079 _method_HotSpotIntrinsicCandidate,
1080 _jdk_internal_vm_annotation_Contended,
1081 _field_Stable,
1082 _jdk_internal_vm_annotation_ReservedStackAccess,
1083 _annotation_LIMIT
1084 };
1085 const Location _location;
1086 int _annotations_present;
1087 u2 _contended_group;
1088
1089 AnnotationCollector(Location location)
1090 : _location(location), _annotations_present(0)
1091 {
1092 assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
1093 }
1094 // If this annotation name has an ID, report it (or _none).
1095 ID annotation_index(const ClassLoaderData* loader_data, const Symbol* name, const bool can_access_vm_annotations);
1096 // Set the annotation name:
1097 void set_annotation(ID id) {
1098 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
1099 _annotations_present |= nth_bit((int)id);
1100 }
1101
1102 void remove_annotation(ID id) {
1103 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
1104 _annotations_present &= ~nth_bit((int)id);
1105 }
1106
1107 // Report if the annotation is present.
1108 bool has_any_annotations() const { return _annotations_present != 0; }
1109 bool has_annotation(ID id) const { return (nth_bit((int)id) & _annotations_present) != 0; }
1110
1111 void set_contended_group(u2 group) { _contended_group = group; }
1112 u2 contended_group() const { return _contended_group; }
1113
1114 bool is_contended() const { return has_annotation(_jdk_internal_vm_annotation_Contended); }
1115
|
1075 _method_DontInline,
1076 _method_InjectedProfile,
1077 _method_LambdaForm_Compiled,
1078 _method_Hidden,
1079 _method_HotSpotIntrinsicCandidate,
1080 _jdk_internal_vm_annotation_Contended,
1081 _field_Stable,
1082 _jdk_internal_vm_annotation_ReservedStackAccess,
1083 _annotation_LIMIT
1084 };
1085 const Location _location;
1086 int _annotations_present;
1087 u2 _contended_group;
1088
1089 AnnotationCollector(Location location)
1090 : _location(location), _annotations_present(0)
1091 {
1092 assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
1093 }
1094 // If this annotation name has an ID, report it (or _none).
1095 ID annotation_index(const ClassLoaderData* loader_data, const Symbol* name, bool can_access_vm_annotations);
1096 // Set the annotation name:
1097 void set_annotation(ID id) {
1098 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
1099 _annotations_present |= nth_bit((int)id);
1100 }
1101
1102 void remove_annotation(ID id) {
1103 assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
1104 _annotations_present &= ~nth_bit((int)id);
1105 }
1106
1107 // Report if the annotation is present.
1108 bool has_any_annotations() const { return _annotations_present != 0; }
1109 bool has_annotation(ID id) const { return (nth_bit((int)id) & _annotations_present) != 0; }
1110
1111 void set_contended_group(u2 group) { _contended_group = group; }
1112 u2 contended_group() const { return _contended_group; }
1113
1114 bool is_contended() const { return has_annotation(_jdk_internal_vm_annotation_Contended); }
1115
|