Path: blob/master/src/hotspot/share/ci/ciFlags.cpp
40930 views
/*1* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "ci/ciFlags.hpp"2627// ciFlags28//29// This class represents klass or method flags3031// ------------------------------------------------------------------32// ciFlags::print_klass_flags33void ciFlags::print_klass_flags(outputStream* st) {34if (is_public()) {35st->print("public");36} else {37st->print("DEFAULT_ACCESS");38}3940if (is_final()) {41st->print(",final");42}43if (is_super()) {44st->print(",super");45}46if (is_interface()) {47st->print(",interface");48}49if (is_abstract()) {50st->print(",abstract");51}52}5354// ------------------------------------------------------------------55// ciFlags::print_member_flags56void ciFlags::print_member_flags(outputStream* st) {57if (is_public()) {58st->print("public");59} else if (is_private()) {60st->print("private");61} else if (is_protected()) {62st->print("protected");63} else {64st->print("DEFAULT_ACCESS");65}6667if (is_static()) {68st->print(",static");69}70if (is_final()) {71st->print(",final");72}73if (is_synchronized()) {74st->print(",synchronized");75}76if (is_volatile()) {77st->print(",volatile");78}79if (is_transient()) {80st->print(",transient");81}82if (is_native()) {83st->print(",native");84}85if (is_abstract()) {86st->print(",abstract");87}8889}9091// ------------------------------------------------------------------92// ciFlags::print93void ciFlags::print(outputStream* st) {94st->print(" flags=%x", _flags);95}969798