src/hotspot/share/ci/ciKlass.cpp
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 46329 hotspot/src/share/vm/ci/ciKlass.cpp@53ccc37bda19
child 49449 ef5d5d343e2a
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
     2
 * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5884
diff changeset
    25
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5884
diff changeset
    26
#include "ci/ciKlass.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5884
diff changeset
    27
#include "ci/ciSymbol.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5884
diff changeset
    28
#include "ci/ciUtilities.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5884
diff changeset
    29
#include "oops/oop.inline.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
// ciKlass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
//
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
    33
// This class represents a Klass* in the HotSpot virtual
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
// machine.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
// ciKlass::ciKlass
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
    38
ciKlass::ciKlass(Klass* k) : ciType(k) {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
    39
  assert(get_Klass()->is_klass(), "wrong type");
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
    40
  Klass* klass = get_Klass();
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
    41
  _layout_helper = klass->layout_helper();
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
    42
  Symbol* klass_name = klass->name();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  assert(klass_name != NULL, "wrong ciKlass constructor");
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
    44
  _name = CURRENT_ENV->get_symbol(klass_name);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
// ciKlass::ciKlass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
// Nameless klass variant.
46329
53ccc37bda19 8155672: Remove instanceKlassHandles and KlassHandles
coleenp
parents: 38030
diff changeset
    51
ciKlass::ciKlass(Klass* k, ciSymbol* name) : ciType(k) {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
    52
  assert(get_Klass()->is_klass(), "wrong type");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  _name = name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  _layout_helper = Klass::_lh_neutral_value;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
// ciKlass::ciKlass
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
// Unloaded klass variant.
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
    61
ciKlass::ciKlass(ciSymbol* name, BasicType bt) : ciType(bt) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  _name = name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  _layout_helper = Klass::_lh_neutral_value;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
// ciKlass::is_subtype_of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
bool ciKlass::is_subtype_of(ciKlass* that) {
33105
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 24002
diff changeset
    69
  assert(this->is_loaded(), "must be loaded: %s", this->name()->as_quoted_ascii());
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 24002
diff changeset
    70
  assert(that->is_loaded(), "must be loaded: %s", that->name()->as_quoted_ascii());
20698
32791aebf1a4 8007923: Tests on references fails
twisti
parents: 13728
diff changeset
    71
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  // Check to see if the klasses are identical.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  if (this == that) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  Klass* this_klass = get_Klass();
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
    79
  Klass* that_klass = that->get_Klass();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  bool result = this_klass->is_subtype_of(that_klass);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  return result;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
// ciKlass::is_subclass_of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
bool ciKlass::is_subclass_of(ciKlass* that) {
33105
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 24002
diff changeset
    88
  assert(this->is_loaded(), "must be loaded: %s", this->name()->as_quoted_ascii());
294e48b4f704 8080775: Better argument formatting for assert() and friends
david
parents: 24002
diff changeset
    89
  assert(that->is_loaded(), "must be loaded: %s", that->name()->as_quoted_ascii());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
38030
93f24e7b3c43 8152590: C2: @Stable support doesn't always work w/ incremental inlining
vlivanov
parents: 33105
diff changeset
    91
  GUARDED_VM_ENTRY(return get_Klass()->is_subclass_of(that->get_Klass());)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
// ciKlass::super_depth
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
juint ciKlass::super_depth() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  assert(is_loaded(), "must be loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  Klass* this_klass = get_Klass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  return this_klass->super_depth();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
// ciKlass::super_check_offset
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
juint ciKlass::super_check_offset() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  assert(is_loaded(), "must be loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  Klass* this_klass = get_Klass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  return this_klass->super_check_offset();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
// ciKlass::super_of_depth
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
ciKlass* ciKlass::super_of_depth(juint i) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  assert(is_loaded(), "must be loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  Klass* this_klass = get_Klass();
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
   121
  Klass* super = this_klass->primary_super_of_depth(i);
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
   122
  return (super != NULL) ? CURRENT_THREAD_ENV->get_klass(super) : NULL;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
// ciKlass::can_be_primary_super
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
bool ciKlass::can_be_primary_super() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  assert(is_loaded(), "must be loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  Klass* this_klass = get_Klass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  return this_klass->can_be_primary_super();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
// ciKlass::least_common_ancestor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
// Get the shared parent of two klasses.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
// Implementation note: this method currently goes "over the wall"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
// and does all of the work on the VM side.  It could be rewritten
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
// to use the super() method and do all of the work (aside from the
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
// lazy computation of super()) in native mode.  This may be
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
// worthwhile if the compiler is repeatedly requesting the same lca
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
// computation or possibly if most of the superklasses have already
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
// been created as ciObjects anyway.  Something to think about...
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
ciKlass*
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
ciKlass::least_common_ancestor(ciKlass* that) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  assert(is_loaded() && that->is_loaded(), "must be loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  // Check to see if the klasses are identical.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  if (this == that) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    return this;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  VM_ENTRY_MARK;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  Klass* this_klass = get_Klass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  Klass* that_klass = that->get_Klass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  Klass* lca        = this_klass->LCA(that_klass);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  // Many times the LCA will be either this_klass or that_klass.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  // Treat these as special cases.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  if (lca == that_klass) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
    return that;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  if (this_klass == lca) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
    return this;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  // Create the ciInstanceKlass for the lca.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  ciKlass* result =
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
   171
    CURRENT_THREAD_ENV->get_klass(lca);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  return result;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
// ciKlass::find_klass
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
// Find a klass using this klass's class loader.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
ciKlass* ciKlass::find_klass(ciSymbol* klass_name) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  assert(is_loaded(), "cannot find_klass through an unloaded klass");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  return CURRENT_ENV->get_klass_by_name(this,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
                                        klass_name, false);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
// ciKlass::java_mirror
5884
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   188
//
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   189
// Get the instance of java.lang.Class corresponding to this klass.
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   190
// If it is an unloaded instance or array klass, return an unloaded
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   191
// mirror object of type Class.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
ciInstance* ciKlass::java_mirror() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  GUARDED_VM_ENTRY(
5884
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   194
    if (!is_loaded())
3963019e3782 6960865: ldc of unloaded class throws an assert in ciTypeFlow
jrose
parents: 5547
diff changeset
   195
      return ciEnv::current()->get_unloaded_klass_mirror(this);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    oop java_mirror = get_Klass()->java_mirror();
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 8921
diff changeset
   197
    return CURRENT_ENV->get_instance(java_mirror);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  )
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
// ciKlass::modifier_flags
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
jint ciKlass::modifier_flags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  assert(is_loaded(), "not loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  GUARDED_VM_ENTRY(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
    return get_Klass()->modifier_flags();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  )
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
// ciKlass::access_flags
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
jint ciKlass::access_flags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  assert(is_loaded(), "not loaded");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  GUARDED_VM_ENTRY(
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
    return get_Klass()->access_flags().as_int();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  )
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
// ciKlass::print_impl
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
// Implementation of the print method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
void ciKlass::print_impl(outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  st->print(" name=");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  print_name_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
// ------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
// ciKlass::print_name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
// Print the name of this klass
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
void ciKlass::print_name_on(outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  name()->print_symbol_on(st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
}
24002
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   235
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   236
const char* ciKlass::external_name() const {
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   237
  GUARDED_VM_ENTRY(
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   238
    return get_Klass()->external_name();
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   239
  )
4e6a72032a99 8005079: fix LogCompilation for incremental inlining
roland
parents: 22234
diff changeset
   240
}