Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.hpp @ 6040:c7ed11779ce8
7159772: instanceKlass::all_fields_count() returns incorrect total field count
Summary: Fix instanceKlass::all_fields_count() bug.
Reviewed-by: kvn, never
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Tue, 10 Apr 2012 09:31:04 -0700 |
parents | f7c4174b33ba |
children | 2766551175a0 |
comparison
equal
deleted
inserted
replaced
5994:4a32c51458b9 | 6040:c7ed11779ce8 |
---|---|
335 | 335 |
336 // Number of Java declared fields | 336 // Number of Java declared fields |
337 int java_fields_count() const { return (int)_java_fields_count; } | 337 int java_fields_count() const { return (int)_java_fields_count; } |
338 | 338 |
339 // Number of fields including any injected fields | 339 // Number of fields including any injected fields |
340 int all_fields_count() const { return _fields->length() / sizeof(FieldInfo::field_slots); } | 340 int all_fields_count() const { return _fields->length() / FieldInfo::field_slots; } |
341 | 341 |
342 typeArrayOop fields() const { return _fields; } | 342 typeArrayOop fields() const { return _fields; } |
343 | 343 |
344 void set_fields(typeArrayOop f, u2 java_fields_count) { | 344 void set_fields(typeArrayOop f, u2 java_fields_count) { |
345 oop_store_without_check((oop*) &_fields, (oop) f); | 345 oop_store_without_check((oop*) &_fields, (oop) f); |