mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8284161: Implementation of Virtual Threads (Preview)
Co-authored-by: Ron Pressler <rpressler@openjdk.org> Co-authored-by: Alan Bateman <alanb@openjdk.org> Co-authored-by: Erik Österlund <eosterlund@openjdk.org> Co-authored-by: Andrew Haley <aph@openjdk.org> Co-authored-by: Rickard Bäckman <rbackman@openjdk.org> Co-authored-by: Markus Grönlund <mgronlun@openjdk.org> Co-authored-by: Leonid Mesnik <lmesnik@openjdk.org> Co-authored-by: Serguei Spitsyn <sspitsyn@openjdk.org> Co-authored-by: Chris Plummer <cjplummer@openjdk.org> Co-authored-by: Coleen Phillimore <coleenp@openjdk.org> Co-authored-by: Robbin Ehn <rehn@openjdk.org> Co-authored-by: Stefan Karlsson <stefank@openjdk.org> Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org> Co-authored-by: Sergey Kuksenko <skuksenko@openjdk.org> Reviewed-by: lancea, eosterlund, rehn, sspitsyn, stefank, tschatzl, dfuchs, lmesnik, dcubed, kevinw, amenkov, dlong, mchung, psandoz, bpb, coleenp, smarks, egahlin, mseledtsov, coffeys, darcy
This commit is contained in:
parent
5212535a27
commit
9583e3657e
1133 changed files with 95935 additions and 8335 deletions
|
@ -65,6 +65,7 @@
|
|||
#include "oops/instanceKlass.inline.hpp"
|
||||
#include "oops/instanceMirrorKlass.hpp"
|
||||
#include "oops/instanceOop.hpp"
|
||||
#include "oops/instanceStackChunkKlass.hpp"
|
||||
#include "oops/klass.inline.hpp"
|
||||
#include "oops/method.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -163,6 +164,12 @@ static inline bool is_class_loader(const Symbol* class_name,
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline bool is_stack_chunk_class(const Symbol* class_name,
|
||||
const ClassLoaderData* loader_data) {
|
||||
return (class_name == vmSymbols::jdk_internal_vm_StackChunk() &&
|
||||
loader_data->is_the_null_class_loader_data());
|
||||
}
|
||||
|
||||
// private: called to verify that k is a static member of this nest.
|
||||
// We know that k is an instance class in the same package and hence the
|
||||
// same classloader.
|
||||
|
@ -440,17 +447,20 @@ InstanceKlass* InstanceKlass::allocate_instance_klass(const ClassFileParser& par
|
|||
// Allocation
|
||||
if (REF_NONE == parser.reference_type()) {
|
||||
if (class_name == vmSymbols::java_lang_Class()) {
|
||||
// mirror
|
||||
// mirror - java.lang.Class
|
||||
ik = new (loader_data, size, THREAD) InstanceMirrorKlass(parser);
|
||||
} else if (is_stack_chunk_class(class_name, loader_data)) {
|
||||
// stack chunk
|
||||
ik = new (loader_data, size, THREAD) InstanceStackChunkKlass(parser);
|
||||
} else if (is_class_loader(class_name, parser)) {
|
||||
// class loader
|
||||
// class loader - java.lang.ClassLoader
|
||||
ik = new (loader_data, size, THREAD) InstanceClassLoaderKlass(parser);
|
||||
} else {
|
||||
// normal
|
||||
ik = new (loader_data, size, THREAD) InstanceKlass(parser);
|
||||
}
|
||||
} else {
|
||||
// reference
|
||||
// java.lang.ref.Reference
|
||||
ik = new (loader_data, size, THREAD) InstanceRefKlass(parser);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue