src/share/vm/ci/ciFlags.hpp

Wed, 31 Jan 2018 19:24:57 -0500

author
dbuck
date
Wed, 31 Jan 2018 19:24:57 -0500
changeset 9289
427b2fb1944f
parent 8664
00cbb581da94
child 8856
ac27a9c85bea
permissions
-rw-r--r--

8189170: Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
Reviewed-by: dcubed

duke@435 1 /*
mikael@6198 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_CI_CIFLAGS_HPP
stefank@2314 26 #define SHARE_VM_CI_CIFLAGS_HPP
stefank@2314 27
stefank@2314 28 #include "ci/ciClassList.hpp"
stefank@2314 29 #include "memory/allocation.hpp"
stefank@2314 30 #include "prims/jvm.h"
stefank@2314 31 #include "utilities/accessFlags.hpp"
stefank@2314 32
duke@435 33 // ciFlags
duke@435 34 //
duke@435 35 // This class represents klass or method flags.
duke@435 36 class ciFlags VALUE_OBJ_CLASS_SPEC {
duke@435 37 private:
duke@435 38 friend class ciInstanceKlass;
duke@435 39 friend class ciField;
duke@435 40 friend class ciMethod;
duke@435 41
duke@435 42 jint _flags;
duke@435 43
duke@435 44 ciFlags() { _flags = 0; }
duke@435 45 ciFlags(AccessFlags flags) { _flags = flags.as_int(); }
duke@435 46
duke@435 47 public:
duke@435 48 // Java access flags
zmajo@8664 49 bool is_public () const { return (_flags & JVM_ACC_PUBLIC ) != 0; }
zmajo@8664 50 bool is_private () const { return (_flags & JVM_ACC_PRIVATE ) != 0; }
zmajo@8664 51 bool is_protected () const { return (_flags & JVM_ACC_PROTECTED ) != 0; }
zmajo@8664 52 bool is_static () const { return (_flags & JVM_ACC_STATIC ) != 0; }
zmajo@8664 53 bool is_final () const { return (_flags & JVM_ACC_FINAL ) != 0; }
zmajo@8664 54 bool is_synchronized () const { return (_flags & JVM_ACC_SYNCHRONIZED ) != 0; }
zmajo@8664 55 bool is_super () const { return (_flags & JVM_ACC_SUPER ) != 0; }
zmajo@8664 56 bool is_volatile () const { return (_flags & JVM_ACC_VOLATILE ) != 0; }
zmajo@8664 57 bool is_transient () const { return (_flags & JVM_ACC_TRANSIENT ) != 0; }
zmajo@8664 58 bool is_native () const { return (_flags & JVM_ACC_NATIVE ) != 0; }
zmajo@8664 59 bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; }
zmajo@8664 60 bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; }
zmajo@8664 61 bool is_strict () const { return (_flags & JVM_ACC_STRICT ) != 0; }
zmajo@8664 62 bool is_stable () const { return (_flags & JVM_ACC_FIELD_STABLE ) != 0; }
zmajo@8664 63 // In case the current object represents a field, return true if
zmajo@8664 64 // the field is modified outside of instance initializer methods
zmajo@8664 65 // (or class/initializer methods if the field is static) and false
zmajo@8664 66 // otherwise.
zmajo@8664 67 bool has_initialized_final_update() const { return (_flags & JVM_ACC_FIELD_INITIALIZED_FINAL_UPDATE) != 0; };
duke@435 68
duke@435 69 // Conversion
duke@435 70 jint as_int() { return _flags; }
duke@435 71
duke@435 72 void print_klass_flags(outputStream* st = tty);
duke@435 73 void print_member_flags(outputStream* st = tty);
duke@435 74 void print(outputStream* st = tty);
duke@435 75 };
stefank@2314 76
stefank@2314 77 #endif // SHARE_VM_CI_CIFLAGS_HPP

mercurial