2509 // Adjust the field type from byte to an unmanaged pointer. |
2509 // Adjust the field type from byte to an unmanaged pointer. |
2510 assert(fac_ptr->nonstatic_byte_count > 0, ""); |
2510 assert(fac_ptr->nonstatic_byte_count > 0, ""); |
2511 fac_ptr->nonstatic_byte_count -= 1; |
2511 fac_ptr->nonstatic_byte_count -= 1; |
2512 (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, |
2512 (*fields_ptr)->ushort_at_put(i + instanceKlass::signature_index_offset, |
2513 word_sig_index); |
2513 word_sig_index); |
2514 if (wordSize == jintSize) { |
2514 fac_ptr->nonstatic_word_count += 1; |
2515 fac_ptr->nonstatic_word_count += 1; |
2515 |
2516 } else { |
2516 FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i + instanceKlass::low_offset); |
2517 fac_ptr->nonstatic_double_count += 1; |
|
2518 } |
|
2519 |
|
2520 FieldAllocationType atype = (FieldAllocationType) (*fields_ptr)->ushort_at(i+4); |
|
2521 assert(atype == NONSTATIC_BYTE, ""); |
2517 assert(atype == NONSTATIC_BYTE, ""); |
2522 FieldAllocationType new_atype = NONSTATIC_WORD; |
2518 FieldAllocationType new_atype = NONSTATIC_WORD; |
2523 if (wordSize > jintSize) { |
2519 (*fields_ptr)->ushort_at_put(i + instanceKlass::low_offset, new_atype); |
2524 if (Universe::field_type_should_be_aligned(T_LONG)) { |
|
2525 atype = NONSTATIC_ALIGNED_DOUBLE; |
|
2526 } else { |
|
2527 atype = NONSTATIC_DOUBLE; |
|
2528 } |
|
2529 } |
|
2530 (*fields_ptr)->ushort_at_put(i+4, new_atype); |
|
2531 |
2520 |
2532 found_vmentry = true; |
2521 found_vmentry = true; |
2533 break; |
2522 break; |
2534 } |
2523 } |
2535 } |
2524 } |
3083 // The field allocation type was temporarily stored in the offset slot. |
3072 // The field allocation type was temporarily stored in the offset slot. |
3084 // oop fields are located before non-oop fields (static and non-static). |
3073 // oop fields are located before non-oop fields (static and non-static). |
3085 int len = fields->length(); |
3074 int len = fields->length(); |
3086 for (int i = 0; i < len; i += instanceKlass::next_offset) { |
3075 for (int i = 0; i < len; i += instanceKlass::next_offset) { |
3087 int real_offset; |
3076 int real_offset; |
3088 FieldAllocationType atype = (FieldAllocationType) fields->ushort_at(i+4); |
3077 FieldAllocationType atype = (FieldAllocationType) fields->ushort_at(i + instanceKlass::low_offset); |
3089 switch (atype) { |
3078 switch (atype) { |
3090 case STATIC_OOP: |
3079 case STATIC_OOP: |
3091 real_offset = next_static_oop_offset; |
3080 real_offset = next_static_oop_offset; |
3092 next_static_oop_offset += heapOopSize; |
3081 next_static_oop_offset += heapOopSize; |
3093 break; |
3082 break; |
3171 next_nonstatic_double_offset += BytesPerLong; |
3160 next_nonstatic_double_offset += BytesPerLong; |
3172 break; |
3161 break; |
3173 default: |
3162 default: |
3174 ShouldNotReachHere(); |
3163 ShouldNotReachHere(); |
3175 } |
3164 } |
3176 fields->short_at_put(i+4, extract_low_short_from_int(real_offset) ); |
3165 fields->short_at_put(i + instanceKlass::low_offset, extract_low_short_from_int(real_offset)); |
3177 fields->short_at_put(i+5, extract_high_short_from_int(real_offset) ); |
3166 fields->short_at_put(i + instanceKlass::high_offset, extract_high_short_from_int(real_offset)); |
3178 } |
3167 } |
3179 |
3168 |
3180 // Size of instances |
3169 // Size of instances |
3181 int instance_size; |
3170 int instance_size; |
3182 |
3171 |