diff src/share/vm/oops/instanceMirrorKlass.cpp @ 4137:04b9a2566eec

Merge with hsx23/hotspot.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 17 Dec 2011 21:40:27 +0100
parents e5928e7dab26
children da91efe96a93
line wrap: on
line diff
--- a/src/share/vm/oops/instanceMirrorKlass.cpp	Sat Dec 17 20:50:09 2011 +0100
+++ b/src/share/vm/oops/instanceMirrorKlass.cpp	Sat Dec 17 21:40:27 2011 +0100
@@ -288,15 +288,7 @@
   // Query before forming handle.
   int size = instance_size(k);
   KlassHandle h_k(THREAD, as_klassOop());
-  instanceOop i;
-
-  if (JavaObjectsInPerm) {
-    i = (instanceOop) CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
-  } else {
-    assert(ScavengeRootsInCode > 0, "must be");
-    i = (instanceOop) CollectedHeap::obj_allocate(h_k, size, CHECK_NULL);
-  }
-
+  instanceOop i = (instanceOop) CollectedHeap::Class_obj_allocate(h_k, size, k, CHECK_NULL);
   return i;
 }