void KlassInfoBucket::iterate(KlassInfoClosure* cic) { KlassInfoEntry* elt = _list; while (elt != NULL) { cic->do_cinfo(elt); elt = elt->next(); } }
void KlassInfoBucket::empty() { KlassInfoEntry* elt = _list; _list = NULL; while (elt != NULL) { KlassInfoEntry* next = elt->next(); delete elt; elt = next; } }
KlassInfoEntry* KlassInfoBucket::lookup(const klassOop k) { KlassInfoEntry* elt = _list; while (elt != NULL) { if (elt->is_equal(k)) { return elt; } elt = elt->next(); } elt = new KlassInfoEntry(k, list()); set_list(elt); return elt; }
KlassInfoEntry* KlassInfoBucket::lookup(Klass* const k) { KlassInfoEntry* elt = _list; while (elt != NULL) { if (elt->is_equal(k)) { return elt; } elt = elt->next(); } elt = new (std::nothrow) KlassInfoEntry(k, list()); // We may be out of space to allocate the new entry. if (elt != NULL) { set_list(elt); } return elt; }