src/share/vm/oops/symbol.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/symbol.hpp

Print this page
rev 9166 : 8139996: CompileCommand prints quoted ascii strings
Summary: Print symbols as utf8
Reviewed-by:


 208 
 209   // Returns an escaped form of a Java string.
 210   char* as_quoted_ascii() const;
 211 
 212   // Returns a null terminated utf8 string in a resource array
 213   char* as_utf8() const { return as_C_string(); }
 214   char* as_utf8_flexible_buffer(Thread* t, char* buf, int size) const {
 215     return as_C_string_flexible_buffer(t, buf, size);
 216   }
 217 
 218   jchar* as_unicode(int& length) const;
 219 
 220   // Treating this symbol as a class name, returns the Java name for the class.
 221   // String is allocated in resource area if buffer is not provided.
 222   // See Klass::external_name()
 223   const char* as_klass_external_name() const;
 224   const char* as_klass_external_name(char* buf, int size) const;
 225 
 226   // Printing
 227   void print_symbol_on(outputStream* st = NULL) const;

 228   void print_on(outputStream* st) const;         // First level print
 229   void print_value_on(outputStream* st) const;   // Second level print.
 230 
 231   // printing on default output stream
 232   void print()         { print_on(tty);       }
 233   void print_value()   { print_value_on(tty); }
 234 
 235 #ifndef PRODUCT
 236   // Empty constructor to create a dummy symbol object on stack
 237   // only for getting its vtable pointer.
 238   Symbol() { }
 239 
 240   static int _total_count;
 241 #endif
 242 };
 243 
 244 // Note: this comparison is used for vtable sorting only; it doesn't matter
 245 // what order it defines, as long as it is a total, time-invariant order
 246 // Since Symbol*s are in C_HEAP, their relative order in memory never changes,
 247 // so use address comparison for speed


 208 
 209   // Returns an escaped form of a Java string.
 210   char* as_quoted_ascii() const;
 211 
 212   // Returns a null terminated utf8 string in a resource array
 213   char* as_utf8() const { return as_C_string(); }
 214   char* as_utf8_flexible_buffer(Thread* t, char* buf, int size) const {
 215     return as_C_string_flexible_buffer(t, buf, size);
 216   }
 217 
 218   jchar* as_unicode(int& length) const;
 219 
 220   // Treating this symbol as a class name, returns the Java name for the class.
 221   // String is allocated in resource area if buffer is not provided.
 222   // See Klass::external_name()
 223   const char* as_klass_external_name() const;
 224   const char* as_klass_external_name(char* buf, int size) const;
 225 
 226   // Printing
 227   void print_symbol_on(outputStream* st = NULL) const;
 228   void print_utf8_on(outputStream* st) const;
 229   void print_on(outputStream* st) const;         // First level print
 230   void print_value_on(outputStream* st) const;   // Second level print.
 231 
 232   // printing on default output stream
 233   void print()         { print_on(tty);       }
 234   void print_value()   { print_value_on(tty); }
 235 
 236 #ifndef PRODUCT
 237   // Empty constructor to create a dummy symbol object on stack
 238   // only for getting its vtable pointer.
 239   Symbol() { }
 240 
 241   static int _total_count;
 242 #endif
 243 };
 244 
 245 // Note: this comparison is used for vtable sorting only; it doesn't matter
 246 // what order it defines, as long as it is a total, time-invariant order
 247 // Since Symbol*s are in C_HEAP, their relative order in memory never changes,
 248 // so use address comparison for speed
src/share/vm/oops/symbol.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File