本文整理汇总了C++中AccessFlags::as_int方法的典型用法代码示例。如果您正苦于以下问题:C++ AccessFlags::as_int方法的具体用法?C++ AccessFlags::as_int怎么用?C++ AccessFlags::as_int使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccessFlags
的用法示例。
在下文中一共展示了AccessFlags::as_int方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fill_in_instance_fields
// ------------------------------------------------------------------
// ciFieldLayout::fill_in_instance_fields
//
// Set up the instance fields in this ciFieldLayout.
void ciFieldLayout::fill_in_instance_fields(GrowableArray<BasicType>* fieldtypes,
GrowableArray<int>* fieldoffsets,
GrowableArray<int>* aflags,
int& pos,
klassOop current) {
Klass* k = current->klass_part();
assert(k->oop_is_instance(), "must be instanceKlass");
instanceKlass* ik = (instanceKlass*)k;
klassOop super = k->super();
if (super) {
fill_in_instance_fields(fieldtypes, fieldoffsets, aflags, pos, super);
}
// Fill in this klass's instance fields.
typeArrayOop field_list = ik->fields();
constantPoolOop cpool = ik->constants();
uint num_fields = field_list->length();
for (uint i = 0; i < num_fields; i += instanceKlass::next_offset) {
AccessFlags flags;
flags.set_flags(field_list->short_at(i + instanceKlass::access_flags_offset));
if (!flags.is_static()) {
// This is an instance field. Add it to our list.
int field_offset = ik->offset_from_fields( i );
// Add the type to our list.
symbolOop type_sym = cpool->symbol_at(field_list->short_at(i+
instanceKlass::signature_index_offset));
BasicType field_type;
field_type = type2field[FieldType::basic_type(type_sym)];
fieldtypes->at_put_grow(pos, field_type, T_VOID);
aflags->at_put_grow(pos, flags.as_int(), 0);
// The field offset we set here includes the header_size
fieldoffsets->at_put_grow(pos, field_offset, 0);
pos++;
}
}
}
示例2: ciFlags
ciFlags(AccessFlags flags) { _flags = flags.as_int(); }
示例3: set_access_flags
void set_access_flags(AccessFlags access_flags) {
int_field_put(access_flags_offset(), access_flags.as_int());
}