src/share/vm/oops/symbolOop.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/oops/symbolOop.cpp Mon Jun 23 14:01:04 2008
--- new/src/share/vm/oops/symbolOop.cpp Mon Jun 23 14:01:04 2008
*** 66,77 ****
--- 66,86 ----
return as_C_string(str, buf_len);
}
void symbolOopDesc::print_symbol_on(outputStream* st) {
st = st ? st : tty;
for (int index = 0; index < utf8_length(); index++)
! st->put((char)byte_at(index));
+ int length = UTF8::unicode_length((const char*)bytes(), utf8_length());
! const char *ptr = (const char *)bytes();
+ jchar value;
+ for (int index = 0; index < length; index++) {
+ ptr = UTF8::next(ptr, &value);
+ if (value >= 32 && value < 127 || value = '\'' || value = '\\') {
+ st->put(value);
+ } else {
+ st->print("\\u%04x", value);
+ }
+ }
}
jchar* symbolOopDesc::as_unicode(int& length) const {
symbolOopDesc* this_ptr = (symbolOopDesc*)this;
length = UTF8::unicode_length((char*)this_ptr->bytes(), utf8_length());
src/share/vm/oops/symbolOop.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File