本文整理汇总了C++中AccessFlags::field_has_generic_signature方法的典型用法代码示例。如果您正苦于以下问题:C++ AccessFlags::field_has_generic_signature方法的具体用法?C++ AccessFlags::field_has_generic_signature怎么用?C++ AccessFlags::field_has_generic_signature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccessFlags
的用法示例。
在下文中一共展示了AccessFlags::field_has_generic_signature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_generic_signature_start_slot
int init_generic_signature_start_slot() {
int length = _fields->length();
int num_fields = 0;
int skipped_generic_signature_slots = 0;
FieldInfo* fi;
AccessFlags flags;
/* Scan from 0 to the current _index. Count the number of generic
signature slots for field[0] to field[_index - 1]. */
for (int i = 0; i < _index; i++) {
fi = FieldInfo::from_field_array(_fields, i);
flags.set_flags(fi->access_flags());
if (flags.field_has_generic_signature()) {
length --;
skipped_generic_signature_slots ++;
}
}
/* Scan from the current _index. */
for (int i = _index; i*FieldInfo::field_slots < length; i++) {
fi = FieldInfo::from_field_array(_fields, i);
flags.set_flags(fi->access_flags());
if (flags.field_has_generic_signature()) {
length --;
}
num_fields ++;
}
_generic_signature_slot = length + skipped_generic_signature_slots;
assert(_generic_signature_slot <= _fields->length(), "");
return num_fields;
}