comparison src/share/vm/asm/codeBuffer.cpp @ 7482:989155e2d07a

Merge with hs25-b15.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 16 Jan 2013 01:34:24 +0100
parents 291ffc492eb6 30866cd626b0
children b9a918201d47
comparison
equal deleted inserted replaced
7381:6761a8f854a4 7482:989155e2d07a
494 // Done calculating sections; did it come out to the right end? 494 // Done calculating sections; did it come out to the right end?
495 assert(buf_offset == total_content_size(), "sanity"); 495 assert(buf_offset == total_content_size(), "sanity");
496 dest->verify_section_allocation(); 496 dest->verify_section_allocation();
497 } 497 }
498 498
499 // Anonymous classes need mirror to keep the metadata alive but 499 // Append an oop reference that keeps the class alive.
500 // for regular classes, the class_loader is sufficient.
501 static void append_oop_references(GrowableArray<oop>* oops, Klass* k) { 500 static void append_oop_references(GrowableArray<oop>* oops, Klass* k) {
502 if (k->oop_is_instance()) { 501 oop cl = k->klass_holder();
503 InstanceKlass* ik = InstanceKlass::cast(k);
504 if (ik->is_anonymous()) {
505 oop o = ik->java_mirror();
506 assert (o != NULL, "should have a mirror");
507 if (!oops->contains(o)) {
508 oops->append(o);
509 }
510 return; // only need the mirror
511 }
512 }
513 oop cl = k->class_loader();
514 if (cl != NULL && !oops->contains(cl)) { 502 if (cl != NULL && !oops->contains(cl)) {
515 oops->append(cl); 503 oops->append(cl);
516 } 504 }
517 } 505 }
518 506