src/share/vm/utilities/accessFlags.hpp

changeset 7333
b12a2a9b05ca
parent 5658
edb5ab0f3fe5
child 7535
7ae4e26cb1e0
child 7635
367427923e39
equal deleted inserted replaced
7332:7024b693c8f9 7333:b12a2a9b05ca
168 void set_queued_for_compilation() { atomic_set_bits(JVM_ACC_QUEUED); } 168 void set_queued_for_compilation() { atomic_set_bits(JVM_ACC_QUEUED); }
169 void clear_queued_for_compilation() { atomic_clear_bits(JVM_ACC_QUEUED); } 169 void clear_queued_for_compilation() { atomic_clear_bits(JVM_ACC_QUEUED); }
170 170
171 // Atomic update of flags 171 // Atomic update of flags
172 void atomic_set_bits(jint bits); 172 void atomic_set_bits(jint bits);
173 bool atomic_set_one_bit(jint bit);
173 void atomic_clear_bits(jint bits); 174 void atomic_clear_bits(jint bits);
174 175
175 private: 176 private:
176 friend class Method; 177 friend class Method;
177 friend class Klass; 178 friend class Klass;
228 void set_field_has_generic_signature() 229 void set_field_has_generic_signature()
229 { 230 {
230 atomic_set_bits(JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE); 231 atomic_set_bits(JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE);
231 } 232 }
232 233
233 void set_on_stack(const bool value) 234 bool set_on_stack(const bool value)
234 { 235 {
235 if (value) { 236 if (value) {
236 atomic_set_bits(JVM_ACC_ON_STACK); 237 return atomic_set_one_bit(JVM_ACC_ON_STACK);
237 } else { 238 } else {
238 atomic_clear_bits(JVM_ACC_ON_STACK); 239 atomic_clear_bits(JVM_ACC_ON_STACK);
240 return true; // Ignored
239 } 241 }
240 } 242 }
241 // Conversion 243 // Conversion
242 jshort as_short() const { return (jshort)_flags; } 244 jshort as_short() const { return (jshort)_flags; }
243 jint as_int() const { return _flags; } 245 jint as_int() const { return _flags; }

mercurial