mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8292059: Do not inline InstanceKlass::allocate_instance()
Reviewed-by: coleenp, stefank
This commit is contained in:
parent
b2639e1d62
commit
cb4ae1922d
3 changed files with 14 additions and 17 deletions
|
@ -1393,6 +1393,18 @@ instanceOop InstanceKlass::allocate_instance(TRAPS) {
|
|||
return i;
|
||||
}
|
||||
|
||||
instanceOop InstanceKlass::allocate_instance(oop java_class, TRAPS) {
|
||||
Klass* k = java_lang_Class::as_Klass(java_class);
|
||||
if (k == nullptr) {
|
||||
ResourceMark rm(THREAD);
|
||||
THROW_(vmSymbols::java_lang_InstantiationException(), nullptr);
|
||||
}
|
||||
InstanceKlass* ik = cast(k);
|
||||
ik->check_valid_for_instantiation(false, CHECK_NULL);
|
||||
ik->initialize(CHECK_NULL);
|
||||
return ik->allocate_instance(THREAD);
|
||||
}
|
||||
|
||||
instanceHandle InstanceKlass::allocate_instance_handle(TRAPS) {
|
||||
return instanceHandle(THREAD, allocate_instance(THREAD));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue