src/share/vm/asm/codeBuffer.cpp

changeset 4345
30866cd626b0
parent 4325
d2f8c38e543d
child 4767
a5de0cc2f91c
     1.1 --- a/src/share/vm/asm/codeBuffer.cpp	Fri Dec 07 10:55:16 2012 -0800
     1.2 +++ b/src/share/vm/asm/codeBuffer.cpp	Wed Dec 12 11:39:29 2012 -0500
     1.3 @@ -496,21 +496,9 @@
     1.4    dest->verify_section_allocation();
     1.5  }
     1.6  
     1.7 -// Anonymous classes need mirror to keep the metadata alive but
     1.8 -// for regular classes, the class_loader is sufficient.
     1.9 +// Append an oop reference that keeps the class alive.
    1.10  static void append_oop_references(GrowableArray<oop>* oops, Klass* k) {
    1.11 -  if (k->oop_is_instance()) {
    1.12 -    InstanceKlass* ik = InstanceKlass::cast(k);
    1.13 -    if (ik->is_anonymous()) {
    1.14 -      oop o = ik->java_mirror();
    1.15 -      assert (o != NULL, "should have a mirror");
    1.16 -      if (!oops->contains(o)) {
    1.17 -        oops->append(o);
    1.18 -      }
    1.19 -      return;  // only need the mirror
    1.20 -    }
    1.21 -  }
    1.22 -  oop cl = k->class_loader();
    1.23 +  oop cl = k->klass_holder();
    1.24    if (cl != NULL && !oops->contains(cl)) {
    1.25      oops->append(cl);
    1.26    }

mercurial