Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.cpp @ 3786:498c6cf70f7e
7058036: FieldsAllocationStyle=2 does not work in 32-bit VM
Summary: parseClassFile() incorrectly uses nonstatic_oop_map_size() method instead of nonstatic_oop_map_count().
Reviewed-by: never
Contributed-by: Krystal Mok <rednaxelafx@gmail.com>
author | kvn |
---|---|
date | Tue, 28 Jun 2011 14:30:27 -0700 |
parents | 8ce625481709 |
children | e6b1331a51d2 |
comparison
equal
deleted
inserted
replaced
3785:ddd894528dbc | 3786:498c6cf70f7e |
---|---|
3285 next_nonstatic_double_offset = next_nonstatic_field_offset; | 3285 next_nonstatic_double_offset = next_nonstatic_field_offset; |
3286 } else if( allocation_style == 2 ) { | 3286 } else if( allocation_style == 2 ) { |
3287 // Fields allocation: oops fields in super and sub classes are together. | 3287 // Fields allocation: oops fields in super and sub classes are together. |
3288 if( nonstatic_field_size > 0 && super_klass() != NULL && | 3288 if( nonstatic_field_size > 0 && super_klass() != NULL && |
3289 super_klass->nonstatic_oop_map_size() > 0 ) { | 3289 super_klass->nonstatic_oop_map_size() > 0 ) { |
3290 int map_size = super_klass->nonstatic_oop_map_size(); | 3290 int map_count = super_klass->nonstatic_oop_map_count(); |
3291 OopMapBlock* first_map = super_klass->start_of_nonstatic_oop_maps(); | 3291 OopMapBlock* first_map = super_klass->start_of_nonstatic_oop_maps(); |
3292 OopMapBlock* last_map = first_map + map_size - 1; | 3292 OopMapBlock* last_map = first_map + map_count - 1; |
3293 int next_offset = last_map->offset() + (last_map->count() * heapOopSize); | 3293 int next_offset = last_map->offset() + (last_map->count() * heapOopSize); |
3294 if (next_offset == next_nonstatic_field_offset) { | 3294 if (next_offset == next_nonstatic_field_offset) { |
3295 allocation_style = 0; // allocate oops first | 3295 allocation_style = 0; // allocate oops first |
3296 next_nonstatic_oop_offset = next_nonstatic_field_offset; | 3296 next_nonstatic_oop_offset = next_nonstatic_field_offset; |
3297 next_nonstatic_double_offset = next_nonstatic_oop_offset + | 3297 next_nonstatic_double_offset = next_nonstatic_oop_offset + |