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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // AccessFlags is an abstraction over Java access flags. 26 27 28 enum { 29 // See jvm.h for shared JVM_ACC_XXX access flags 30 31 // HotSpot-specific access flags 32 33 // flags actually put in .class file 34 JVM_ACC_WRITTEN_FLAGS = 0x00007FFF, 35 36 // methodOop flags 37 JVM_ACC_MONITOR_MATCH = 0x10000000, // True if we know that monitorenter/monitorexit bytecodes match 38 JVM_ACC_HAS_MONITOR_BYTECODES = 0x20000000, // Method contains monitorenter/monitorexit bytecodes 39 JVM_ACC_HAS_LOOPS = 0x40000000, // Method has loops 40 JVM_ACC_LOOPS_FLAG_INIT = (int)0x80000000,// The loop flag has been initialized 41 JVM_ACC_QUEUED = 0x01000000, // Queued for compilation 42 JVM_ACC_NOT_C2_COMPILABLE = 0x02000000, 43 JVM_ACC_NOT_C1_COMPILABLE = 0x04000000, 44 JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000, 209 } else { 210 atomic_clear_bits(JVM_ACC_FIELD_MODIFICATION_WATCHED); 211 } 212 } 213 214 // Conversion 215 jshort as_short() { return (jshort)_flags; } 216 jint as_int() { return _flags; } 217 218 inline friend AccessFlags accessFlags_from(jint flags); 219 220 // Printing/debugging 221 void print_on(outputStream* st) const PRODUCT_RETURN; 222 }; 223 224 inline AccessFlags accessFlags_from(jint flags) { 225 AccessFlags af; 226 af._flags = flags; 227 return af; 228 } | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_UTILITIES_ACCESSFLAGS_HPP 26 #define SHARE_VM_UTILITIES_ACCESSFLAGS_HPP 27 28 #include "prims/jvm.h" 29 #include "utilities/top.hpp" 30 31 // AccessFlags is an abstraction over Java access flags. 32 33 34 enum { 35 // See jvm.h for shared JVM_ACC_XXX access flags 36 37 // HotSpot-specific access flags 38 39 // flags actually put in .class file 40 JVM_ACC_WRITTEN_FLAGS = 0x00007FFF, 41 42 // methodOop flags 43 JVM_ACC_MONITOR_MATCH = 0x10000000, // True if we know that monitorenter/monitorexit bytecodes match 44 JVM_ACC_HAS_MONITOR_BYTECODES = 0x20000000, // Method contains monitorenter/monitorexit bytecodes 45 JVM_ACC_HAS_LOOPS = 0x40000000, // Method has loops 46 JVM_ACC_LOOPS_FLAG_INIT = (int)0x80000000,// The loop flag has been initialized 47 JVM_ACC_QUEUED = 0x01000000, // Queued for compilation 48 JVM_ACC_NOT_C2_COMPILABLE = 0x02000000, 49 JVM_ACC_NOT_C1_COMPILABLE = 0x04000000, 50 JVM_ACC_NOT_OSR_COMPILABLE = 0x08000000, 215 } else { 216 atomic_clear_bits(JVM_ACC_FIELD_MODIFICATION_WATCHED); 217 } 218 } 219 220 // Conversion 221 jshort as_short() { return (jshort)_flags; } 222 jint as_int() { return _flags; } 223 224 inline friend AccessFlags accessFlags_from(jint flags); 225 226 // Printing/debugging 227 void print_on(outputStream* st) const PRODUCT_RETURN; 228 }; 229 230 inline AccessFlags accessFlags_from(jint flags) { 231 AccessFlags af; 232 af._flags = flags; 233 return af; 234 } 235 236 #endif // SHARE_VM_UTILITIES_ACCESSFLAGS_HPP |