< prev index next >

src/hotspot/share/oops/fieldInfo.cpp

Print this page

 91   int ifc = r.next_uint();
 92   assert(ifc == injected_fields, "Must be");
 93   for (int i = 0; i < jfc + ifc; i++) {
 94     FieldInfo fi;
 95     r.read_field_info(fi);
 96     FieldInfo* fi_ref = fields->adr_at(i);
 97     assert(fi_ref->name_index() == fi.name_index(), "Must be");
 98     assert(fi_ref->signature_index() == fi.signature_index(), "Must be");
 99     assert(fi_ref->offset() == fi.offset(), "Must be");
100     assert(fi_ref->access_flags().as_int() == fi.access_flags().as_int(), "Must be");
101     assert(fi_ref->field_flags().as_uint() == fi.field_flags().as_uint(), " Must be");
102     if(fi_ref->field_flags().is_initialized()) {
103       assert(fi_ref->initializer_index() == fi.initializer_index(), "Must be");
104     }
105     if (fi_ref->field_flags().is_generic()) {
106       assert(fi_ref->generic_signature_index() == fi.generic_signature_index(), "Must be");
107     }
108     if (fi_ref->field_flags().is_contended()) {
109       assert(fi_ref->contended_group() == fi.contended_group(), "Must be");
110     }



111   }
112 #endif // ASSERT
113 
114   return fis;
115 }
116 
117 GrowableArray<FieldInfo>* FieldInfoStream::create_FieldInfoArray(const Array<u1>* fis, int* java_fields_count, int* injected_fields_count) {
118   int length = FieldInfoStream::num_total_fields(fis);
119   GrowableArray<FieldInfo>* array = new GrowableArray<FieldInfo>(length);
120   FieldInfoReader r(fis);
121   *java_fields_count = r.next_uint();
122   *injected_fields_count = r.next_uint();
123   while (r.has_next()) {
124     FieldInfo fi;
125     r.read_field_info(fi);
126     array->append(fi);
127   }
128   assert(array->length() == length, "Must be");
129   assert(array->length() == *java_fields_count + *injected_fields_count, "Must be");
130   return array;

 91   int ifc = r.next_uint();
 92   assert(ifc == injected_fields, "Must be");
 93   for (int i = 0; i < jfc + ifc; i++) {
 94     FieldInfo fi;
 95     r.read_field_info(fi);
 96     FieldInfo* fi_ref = fields->adr_at(i);
 97     assert(fi_ref->name_index() == fi.name_index(), "Must be");
 98     assert(fi_ref->signature_index() == fi.signature_index(), "Must be");
 99     assert(fi_ref->offset() == fi.offset(), "Must be");
100     assert(fi_ref->access_flags().as_int() == fi.access_flags().as_int(), "Must be");
101     assert(fi_ref->field_flags().as_uint() == fi.field_flags().as_uint(), " Must be");
102     if(fi_ref->field_flags().is_initialized()) {
103       assert(fi_ref->initializer_index() == fi.initializer_index(), "Must be");
104     }
105     if (fi_ref->field_flags().is_generic()) {
106       assert(fi_ref->generic_signature_index() == fi.generic_signature_index(), "Must be");
107     }
108     if (fi_ref->field_flags().is_contended()) {
109       assert(fi_ref->contended_group() == fi.contended_group(), "Must be");
110     }
111     if (fi_ref->field_flags().has_null_marker()) {
112       assert(fi_ref->null_marker_offset() == fi.null_marker_offset(), "Must be");
113     }
114   }
115 #endif // ASSERT
116 
117   return fis;
118 }
119 
120 GrowableArray<FieldInfo>* FieldInfoStream::create_FieldInfoArray(const Array<u1>* fis, int* java_fields_count, int* injected_fields_count) {
121   int length = FieldInfoStream::num_total_fields(fis);
122   GrowableArray<FieldInfo>* array = new GrowableArray<FieldInfo>(length);
123   FieldInfoReader r(fis);
124   *java_fields_count = r.next_uint();
125   *injected_fields_count = r.next_uint();
126   while (r.has_next()) {
127     FieldInfo fi;
128     r.read_field_info(fi);
129     array->append(fi);
130   }
131   assert(array->length() == length, "Must be");
132   assert(array->length() == *java_fields_count + *injected_fields_count, "Must be");
133   return array;
< prev index next >