Mercurial > hg > graal-compiler
diff src/share/vm/oops/instanceKlass.hpp @ 10343:6bd680e9ea35
8003421: NPG: Move oops out of InstanceKlass into mirror
Summary: Inject protection_domain, signers, init_lock into java_lang_Class
Reviewed-by: stefank, dholmes, sla
author | coleenp |
---|---|
date | Wed, 22 May 2013 14:37:49 -0400 |
parents | 92ef81e2f571 |
children | b7fa10a3a69a |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp Tue May 21 19:52:01 2013 -0700 +++ b/src/share/vm/oops/instanceKlass.hpp Wed May 22 14:37:49 2013 -0400 @@ -58,8 +58,6 @@ // [fields ] // [constants ] // [class loader ] -// [protection domain ] -// [signers ] // [source file name ] // [inner classes ] // [static field size ] @@ -180,16 +178,6 @@ static volatile int _total_instanceKlass_count; protected: - // Protection domain. - oop _protection_domain; - // Class signers. - objArrayOop _signers; - // Lock for (1) initialization; (2) access to the ConstantPool of this class. - // Must be one per class and it has to be a VM internal object so java code - // cannot lock it (like the mirror). - // It has to be an object not a Mutex because it's held through java calls. - volatile oop _init_lock; - // Annotations for this class Annotations* _annotations; // Array classes holding elements of this class. @@ -527,8 +515,10 @@ void set_constants(ConstantPool* c) { _constants = c; } // protection domain - oop protection_domain() { return _protection_domain; } - void set_protection_domain(oop pd) { klass_oop_store(&_protection_domain, pd); } + oop protection_domain() const; + + // signers + objArrayOop signers() const; // host class Klass* host_klass() const { @@ -575,10 +565,6 @@ } } - // signers - objArrayOop signers() const { return _signers; } - void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } - // source file name Symbol* source_file_name() const { return _source_file_name; } void set_source_file_name(Symbol* n); @@ -912,8 +898,6 @@ Method* method_at_itable(Klass* holder, int index, TRAPS); // Garbage collection - virtual void oops_do(OopClosure* cl); - void oop_follow_contents(oop obj); int oop_adjust_pointers(oop obj); @@ -999,14 +983,12 @@ // Lock during initialization public: - volatile oop init_lock() const {return _init_lock; } + // Lock for (1) initialization; (2) access to the ConstantPool of this class. + // Must be one per class and it has to be a VM internal object so java code + // cannot lock it (like the mirror). + // It has to be an object not a Mutex because it's held through java calls. + volatile oop init_lock() const; private: - void set_init_lock(oop value) { klass_oop_store(&_init_lock, value); } - - // Offsets for memory management - oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;} - oop* adr_signers() const { return (oop*)&this->_signers;} - oop* adr_init_lock() const { return (oop*)&this->_init_lock;} // Static methods that are used to implement member methods where an exposed this pointer // is needed due to possible GCs