Mercurial > hg > truffle
diff src/share/vm/classfile/classLoaderData.hpp @ 7409:30866cd626b0
8004883: NPG: clean up anonymous class fix
Summary: Add klass_holder() to return either mirror or class_loader depending on if the class is anonymous or not.
Reviewed-by: stefank, jrose
author | coleenp |
---|---|
date | Wed, 12 Dec 2012 11:39:29 -0500 |
parents | 90273fc0a981 |
children | e94068d4ff52 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoaderData.hpp Fri Dec 07 10:55:16 2012 -0800 +++ b/src/share/vm/classfile/classLoaderData.hpp Wed Dec 12 11:39:29 2012 -0500 @@ -109,6 +109,7 @@ Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup. bool _unloading; // true if this class loader goes away bool _keep_alive; // if this CLD can be unloaded for anonymous loaders + bool _is_anonymous; // if this CLD is for an anonymous class volatile int _claimed; // true if claimed, for example during GC traces. // To avoid applying oop closure more than once. // Has to be an int because we cas it. @@ -139,7 +140,7 @@ void set_next(ClassLoaderData* next) { _next = next; } ClassLoaderData* next() const { return _next; } - ClassLoaderData(Handle h_class_loader); + ClassLoaderData(Handle h_class_loader, bool is_anonymous); ~ClassLoaderData(); void set_metaspace(Metaspace* m) { _metaspace = m; } @@ -174,12 +175,12 @@ return _the_null_class_loader_data; } - bool is_anonymous() const; + bool is_anonymous() const { return _is_anonymous; } static void init_null_class_loader_data() { assert(_the_null_class_loader_data == NULL, "cannot initialize twice"); assert(ClassLoaderDataGraph::_head == NULL, "cannot initialize twice"); - _the_null_class_loader_data = new ClassLoaderData((oop)NULL); + _the_null_class_loader_data = new ClassLoaderData((oop)NULL, false); ClassLoaderDataGraph::_head = _the_null_class_loader_data; assert(_the_null_class_loader_data->is_the_null_class_loader_data(), "Must be"); if (DumpSharedSpaces) {