mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8292059: Do not inline InstanceKlass::allocate_instance()
Reviewed-by: coleenp, stefank
(cherry picked from commit cb4ae1922d)
This commit is contained in:
committed by
Vitaly Provodin
parent
f991c6c31e
commit
85f391aef2
@@ -1430,6 +1430,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"
|
||||
|
||||
Reference in New Issue
Block a user