Mercurial > hg > graal-compiler
comparison src/share/vm/memory/dump.cpp @ 5967:f7c4174b33ba
7109878: The instanceKlass EnclosingMethhod attribute fields can be folded into the _inner_class field.
Summary: Fold instanceKlass::_enclosing_method_class_index and instanceKlass::_enclosing_method_method_index into the instanceKlass::_inner_classes array.
Reviewed-by: never, coleenp
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Tue, 13 Mar 2012 13:50:48 -0400 |
parents | 52b5d32fbfaf |
children | 749b1464aa81 |
comparison
equal
deleted
inserted
replaced
5933:fde683df4c27 | 5967:f7c4174b33ba |
---|---|
295 Klass* k = Klass::cast((klassOop)obj); | 295 Klass* k = Klass::cast((klassOop)obj); |
296 k->shared_symbols_iterate(_closure); | 296 k->shared_symbols_iterate(_closure); |
297 | 297 |
298 if (obj->blueprint()->oop_is_instanceKlass()) { | 298 if (obj->blueprint()->oop_is_instanceKlass()) { |
299 instanceKlass* ik = instanceKlass::cast((klassOop)obj); | 299 instanceKlass* ik = instanceKlass::cast((klassOop)obj); |
300 typeArrayOop inner_classes = ik->inner_classes(); | 300 instanceKlassHandle ik_h((klassOop)obj); |
301 if (inner_classes != NULL) { | 301 InnerClassesIterator iter(ik_h); |
302 constantPoolOop constants = ik->constants(); | 302 constantPoolOop constants = ik->constants(); |
303 int n = inner_classes->length(); | 303 for (; !iter.done(); iter.next()) { |
304 for (int i = 0; i < n; i += instanceKlass::inner_class_next_offset) { | 304 int index = iter.inner_name_index(); |
305 int ioff = i + instanceKlass::inner_class_inner_name_offset; | 305 |
306 int index = inner_classes->ushort_at(ioff); | 306 if (index != 0) { |
307 if (index != 0) { | 307 _closure->do_symbol(constants->symbol_at_addr(index)); |
308 _closure->do_symbol(constants->symbol_at_addr(index)); | |
309 } | |
310 } | 308 } |
311 } | 309 } |
312 } | 310 } |
313 } | 311 } |
314 | 312 |