Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
3737:9dc19b7d89a3 | 4137:04b9a2566eec |
---|---|
286 | 286 |
287 instanceOop instanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { | 287 instanceOop instanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { |
288 // Query before forming handle. | 288 // Query before forming handle. |
289 int size = instance_size(k); | 289 int size = instance_size(k); |
290 KlassHandle h_k(THREAD, as_klassOop()); | 290 KlassHandle h_k(THREAD, as_klassOop()); |
291 instanceOop i; | 291 instanceOop i = (instanceOop) CollectedHeap::Class_obj_allocate(h_k, size, k, CHECK_NULL); |
292 | |
293 if (JavaObjectsInPerm) { | |
294 i = (instanceOop) CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL); | |
295 } else { | |
296 assert(ScavengeRootsInCode > 0, "must be"); | |
297 i = (instanceOop) CollectedHeap::obj_allocate(h_k, size, CHECK_NULL); | |
298 } | |
299 | |
300 return i; | 292 return i; |
301 } | 293 } |
302 | 294 |
303 int instanceMirrorKlass::oop_size(oop obj) const { | 295 int instanceMirrorKlass::oop_size(oop obj) const { |
304 return java_lang_Class::oop_size(obj); | 296 return java_lang_Class::oop_size(obj); |