hotspot/src/share/vm/oops/symbolKlass.cpp
author jrose
Fri, 08 Jan 2010 13:47:01 -0800
changeset 4584 e2a449e8cc6f
parent 768 d0bebc7eefc2
child 5547 f4b087cbb361
permissions -rw-r--r--
6912062: disassembler plugin needs to produce symbolic information in product mode Summary: More informative disassembly in product mode. Also, a more consistent CompileCommand syntax. Reviewed-by: never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
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
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
# include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
# include "incls/_symbolKlass.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
symbolOop symbolKlass::allocate_symbol(u1* name, int len, TRAPS) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
  // Don't allow symbol oops to be created which cannot fit in a symbolOop.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
  if (len > symbolOopDesc::max_length()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
    THROW_MSG_0(vmSymbols::java_lang_InternalError(),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
                "name is too long to represent");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
  int size = symbolOopDesc::object_size(len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
  symbolKlassHandle h_k(THREAD, as_klassOop());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  symbolOop sym = (symbolOop)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  assert(!sym->is_parsable(), "not expecting parsability yet.");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  No_Safepoint_Verifier no_safepoint;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  sym->set_utf8_length(len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  for (int i = 0; i < len; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    sym->byte_at_put(i, name[i]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  // Let the first emptySymbol be created and
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  // ensure only one is ever created.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  assert(sym->is_parsable() || Universe::emptySymbol() == NULL,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
         "should be parsable here.");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  return sym;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
bool symbolKlass::allocate_symbols(int names_count, const char** names,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
                                   int* lengths, symbolOop* sym_oops, TRAPS) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  if (UseConcMarkSweepGC || UseParallelGC) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
    // Concurrent GC needs to mark all the allocated symbol oops after
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    // the remark phase which isn't done below (except the first symbol oop).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    // So return false which will let the symbols be allocated one by one.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    // The parallel collector uses an object start array to find the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    // start of objects on a dirty card.  The object start array is not
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    // updated for the start of each symbol so is not precise.  During
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    // object array verification this causes a verification failure.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    // In a product build this causes extra searching for the start of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    // a symbol.  As with the concurrent collector a return of false will
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    // cause each symbol to be allocated separately and in the case
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    // of the parallel collector will cause the object
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    // start array to be updated.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  assert(names_count > 0, "can't allocate 0 symbols");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  int total_size = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  int i, sizes[SymbolTable::symbol_alloc_batch_size];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  for (i=0; i<names_count; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    int len = lengths[i];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    if (len > symbolOopDesc::max_length()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
      return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    int sz = symbolOopDesc::object_size(len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    sizes[i] = sz * HeapWordSize;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    total_size += sz;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  symbolKlassHandle h_k(THREAD, as_klassOop());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  HeapWord* base = Universe::heap()->permanent_mem_allocate(total_size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  if (base == NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    return false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  // CAN'T take any safepoint during the initialization of the symbol oops !
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  No_Safepoint_Verifier nosafepoint;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  klassOop sk = h_k();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  int pos = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  for (i=0; i<names_count; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    symbolOop s = (symbolOop) (((char*)base) + pos);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    s->set_mark(markOopDesc::prototype());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    s->set_klass(sk);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
    s->set_utf8_length(lengths[i]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    const char* name = names[i];
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    for (int j=0; j<lengths[i]; j++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
      s->byte_at_put(j, name[j]);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    assert(s->is_parsable(), "should be parsable here.");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    sym_oops[i] = s;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    pos += sizes[i];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  return true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
klassOop symbolKlass::create_klass(TRAPS) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  symbolKlass o;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  KlassHandle h_this_klass(THREAD, Universe::klassKlassObj());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  // Make sure size calculation is right
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  assert(k()->size() == align_object_size(header_size()), "wrong size for object");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
//  java_lang_Class::create_mirror(k, CHECK_NULL); // Allocate mirror
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  return k();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
int symbolKlass::oop_size(oop obj) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  assert(obj->is_symbol(),"must be a symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  symbolOop s = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  int size = s->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
bool symbolKlass::oop_is_parsable(oop obj) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  assert(obj->is_symbol(),"must be a symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  symbolOop s = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  return s->object_is_parsable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
void symbolKlass::oop_follow_contents(oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  assert (obj->is_symbol(), "object must be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  // Performance tweak: We skip iterating over the klass pointer since we
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  // know that Universe::symbolKlassObj never moves.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  // Note: do not follow next link here (see SymbolTable::follow_contents)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
#ifndef SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
void symbolKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  assert (obj->is_symbol(), "object must be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  // Performance tweak: We skip iterating over the klass pointer since we
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  // know that Universe::symbolKlassObj never moves.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
  // Note: do not follow next link here (see SymbolTable::follow_contents)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
#endif // SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
int symbolKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  assert(obj->is_symbol(), "object must be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  symbolOop s = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  // Get size before changing pointers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  int size = s->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  // Performance tweak: We skip iterating over the klass pointer since we
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  // know that Universe::symbolKlassObj never moves.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
int symbolKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  assert(obj->is_symbol(), "object must be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  symbolOop s = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  // Get size before changing pointers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  int size = s->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  // Performance tweak: We skip iterating over the klass pointer since we
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  // know that Universe::symbolKlassObj never moves.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
int symbolKlass::oop_adjust_pointers(oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  assert(obj->is_symbol(), "should be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  symbolOop s = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  // Get size before changing pointers.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  // Don't call size() or oop_size() since that is a virtual call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  int size = s->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  // Performance tweak: We skip iterating over the klass pointer since we
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  // know that Universe::symbolKlassObj never moves.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  return size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
#ifndef SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
void symbolKlass::oop_copy_contents(PSPromotionManager* pm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  assert(obj->is_symbol(), "should be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
void symbolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  assert(obj->is_symbol(), "should be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
int symbolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  assert(obj->is_symbol(), "should be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  return symbolOop(obj)->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
int symbolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
                                     HeapWord* beg_addr, HeapWord* end_addr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  assert(obj->is_symbol(), "should be symbol");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  return symbolOop(obj)->object_size();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
#endif // SERIALGC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
// Printing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
void symbolKlass::oop_print_on(oop obj, outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  st->print("Symbol: '");
768
d0bebc7eefc2 6718676: putback for 6604014 is incomplete
never
parents: 1
diff changeset
   212
  symbolOop(obj)->print_symbol_on(st);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  st->print("'");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
4584
e2a449e8cc6f 6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents: 768
diff changeset
   216
#endif //PRODUCT
e2a449e8cc6f 6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents: 768
diff changeset
   217
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
void symbolKlass::oop_print_value_on(oop obj, outputStream* st) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  symbolOop sym = symbolOop(obj);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  st->print("'");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  for (int i = 0; i < sym->utf8_length(); i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
    st->print("%c", sym->byte_at(i));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  st->print("'");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
const char* symbolKlass::internal_name() const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  return "{symbol}";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
}