1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
57 new_flags = old_flags & ~bits; |
57 new_flags = old_flags & ~bits; |
58 f = Atomic::cmpxchg(new_flags, &_flags, old_flags); |
58 f = Atomic::cmpxchg(new_flags, &_flags, old_flags); |
59 } while(f != old_flags); |
59 } while(f != old_flags); |
60 } |
60 } |
61 |
61 |
62 #ifndef PRODUCT |
62 #if !defined(PRODUCT) || INCLUDE_JVMTI |
63 |
63 |
64 void AccessFlags::print_on(outputStream* st) const { |
64 void AccessFlags::print_on(outputStream* st) const { |
65 if (is_public ()) st->print("public " ); |
65 if (is_public ()) st->print("public " ); |
66 if (is_private ()) st->print("private " ); |
66 if (is_private ()) st->print("private " ); |
67 if (is_protected ()) st->print("protected " ); |
67 if (is_protected ()) st->print("protected " ); |
78 if (is_old ()) st->print("{old} " ); |
78 if (is_old ()) st->print("{old} " ); |
79 if (is_obsolete ()) st->print("{obsolete} " ); |
79 if (is_obsolete ()) st->print("{obsolete} " ); |
80 if (on_stack ()) st->print("{on_stack} " ); |
80 if (on_stack ()) st->print("{on_stack} " ); |
81 } |
81 } |
82 |
82 |
83 #endif |
83 #endif // !PRODUCT || INCLUDE_JVMTI |
84 |
84 |
85 void accessFlags_init() { |
85 void accessFlags_init() { |
86 assert(sizeof(AccessFlags) == sizeof(jint), "just checking size of flags"); |
86 assert(sizeof(AccessFlags) == sizeof(jint), "just checking size of flags"); |
87 } |
87 } |