equal
deleted
inserted
replaced
292 trace_stream.cr(); |
292 trace_stream.cr(); |
293 } |
293 } |
294 } |
294 } |
295 |
295 |
296 void Symbol::print_on(outputStream* st) const { |
296 void Symbol::print_on(outputStream* st) const { |
297 if (this == NULL) { |
297 st->print("Symbol: '"); |
298 st->print_cr("NULL"); |
298 print_symbol_on(st); |
299 } else { |
299 st->print("'"); |
300 st->print("Symbol: '"); |
300 st->print(" count %d", refcount()); |
301 print_symbol_on(st); |
|
302 st->print("'"); |
|
303 st->print(" count %d", refcount()); |
|
304 } |
|
305 } |
301 } |
306 |
302 |
307 // The print_value functions are present in all builds, to support the |
303 // The print_value functions are present in all builds, to support the |
308 // disassembler and error reporting. |
304 // disassembler and error reporting. |
309 void Symbol::print_value_on(outputStream* st) const { |
305 void Symbol::print_value_on(outputStream* st) const { |
310 if (this == NULL) { |
306 st->print("'"); |
311 st->print("NULL"); |
307 for (int i = 0; i < utf8_length(); i++) { |
312 } else { |
308 st->print("%c", char_at(i)); |
313 st->print("'"); |
309 } |
314 for (int i = 0; i < utf8_length(); i++) { |
310 st->print("'"); |
315 st->print("%c", char_at(i)); |
|
316 } |
|
317 st->print("'"); |
|
318 } |
|
319 } |
311 } |
320 |
312 |
321 bool Symbol::is_valid(Symbol* s) { |
313 bool Symbol::is_valid(Symbol* s) { |
322 if (!is_aligned(s, sizeof(MetaWord))) return false; |
314 if (!is_aligned(s, sizeof(MetaWord))) return false; |
323 if ((size_t)s < os::min_page_size()) return false; |
315 if ((size_t)s < os::min_page_size()) return false; |