Wed, 23 Oct 2013 12:40:23 +0200
8024070: C2 needs some form of type speculation
Summary: record unused type profile information with type system, propagate and use it.
Reviewed-by: kvn, twisti
duke@435 | 1 | /* |
stefank@2314 | 2 | * Copyright (c) 1999, 2010, 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 |
duke@435 | 49 | bool is_public () const { return (_flags & JVM_ACC_PUBLIC ) != 0; } |
duke@435 | 50 | bool is_private () const { return (_flags & JVM_ACC_PRIVATE ) != 0; } |
duke@435 | 51 | bool is_protected () const { return (_flags & JVM_ACC_PROTECTED ) != 0; } |
duke@435 | 52 | bool is_static () const { return (_flags & JVM_ACC_STATIC ) != 0; } |
duke@435 | 53 | bool is_final () const { return (_flags & JVM_ACC_FINAL ) != 0; } |
duke@435 | 54 | bool is_synchronized() const { return (_flags & JVM_ACC_SYNCHRONIZED) != 0; } |
duke@435 | 55 | bool is_super () const { return (_flags & JVM_ACC_SUPER ) != 0; } |
duke@435 | 56 | bool is_volatile () const { return (_flags & JVM_ACC_VOLATILE ) != 0; } |
duke@435 | 57 | bool is_transient () const { return (_flags & JVM_ACC_TRANSIENT ) != 0; } |
duke@435 | 58 | bool is_native () const { return (_flags & JVM_ACC_NATIVE ) != 0; } |
duke@435 | 59 | bool is_interface () const { return (_flags & JVM_ACC_INTERFACE ) != 0; } |
duke@435 | 60 | bool is_abstract () const { return (_flags & JVM_ACC_ABSTRACT ) != 0; } |
duke@435 | 61 | bool is_strict () const { return (_flags & JVM_ACC_STRICT ) != 0; } |
vlivanov@5658 | 62 | bool is_stable () const { return (_flags & JVM_ACC_FIELD_STABLE) != 0; } |
duke@435 | 63 | |
duke@435 | 64 | // Conversion |
duke@435 | 65 | jint as_int() { return _flags; } |
duke@435 | 66 | |
duke@435 | 67 | void print_klass_flags(outputStream* st = tty); |
duke@435 | 68 | void print_member_flags(outputStream* st = tty); |
duke@435 | 69 | void print(outputStream* st = tty); |
duke@435 | 70 | }; |
stefank@2314 | 71 | |
stefank@2314 | 72 | #endif // SHARE_VM_CI_CIFLAGS_HPP |