Mercurial > hg > graal-compiler
diff src/share/vm/oops/constantPool.hpp @ 13102:f9f4503a4ab5
Merge
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Thu, 21 Nov 2013 15:04:54 +0100 |
parents | 096c224171c4 |
children |
line wrap: on
line diff
--- a/src/share/vm/oops/constantPool.hpp Thu Nov 21 15:04:26 2013 +0100 +++ b/src/share/vm/oops/constantPool.hpp Thu Nov 21 15:04:54 2013 +0100 @@ -111,6 +111,7 @@ int _version; } _saved; + Monitor* _lock; void set_tags(Array<u1>* tags) { _tags = tags; } void tag_at_put(int which, jbyte t) { tags()->at_put(which, t); } @@ -845,17 +846,8 @@ void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } int resolved_reference_length() const { return _saved._resolved_reference_length; } - - // lock() may return null -- constant pool updates may happen before this lock is - // initialized, because the _pool_holder has not been fully initialized and - // has not been registered into the system dictionary. In this case, no other - // thread can be modifying this constantpool, so no synchronization is - // necessary. - // - // Use cplock() like this: - // oop cplock = cp->lock(); - // ObjectLocker ol(cplock , THREAD, cplock != NULL); - oop lock(); + void set_lock(Monitor* lock) { _lock = lock; } + Monitor* lock() { return _lock; } // Decrease ref counts of symbols that are in the constant pool // when the holder class is unloaded