mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +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));
|
||||
}
|
||||
|
|
|
@ -27,16 +27,12 @@
|
|||
|
||||
#include "oops/instanceKlass.hpp"
|
||||
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/memRegion.hpp"
|
||||
#include "oops/klass.inline.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/devirtualizer.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
inline intptr_t* InstanceKlass::start_of_itable() const { return (intptr_t*)start_of_vtable() + vtable_length(); }
|
||||
inline intptr_t* InstanceKlass::end_of_itable() const { return start_of_itable() + itable_length(); }
|
||||
|
@ -185,16 +181,4 @@ ALWAYSINLINE void InstanceKlass::oop_oop_iterate_bounded(oop obj, OopClosureType
|
|||
oop_oop_iterate_oop_maps_bounded<T>(obj, closure, mr);
|
||||
}
|
||||
|
||||
inline 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);
|
||||
}
|
||||
|
||||
#endif // SHARE_OOPS_INSTANCEKLASS_INLINE_HPP
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/vmSymbols.hpp"
|
||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue