< prev index next >

src/hotspot/share/oops/symbol.hpp

Print this page




 239   const char* as_klass_external_name(char* buf, int size) const;
 240 
 241   void metaspace_pointers_do(MetaspaceClosure* it);
 242   MetaspaceObj::Type type() const { return SymbolType; }
 243 
 244   // Printing
 245   void print_symbol_on(outputStream* st = NULL) const;
 246   void print_utf8_on(outputStream* st) const;
 247   void print_on(outputStream* st) const;         // First level print
 248   void print_value_on(outputStream* st) const;   // Second level print.
 249 
 250   // printing on default output stream
 251   void print()         { print_on(tty);       }
 252   void print_value()   { print_value_on(tty); }
 253 
 254 #ifndef PRODUCT
 255   // Empty constructor to create a dummy symbol object on stack
 256   // only for getting its vtable pointer.
 257   Symbol() { }
 258 
 259   static int _total_count;
 260 #endif
 261 };
 262 
 263 // Note: this comparison is used for vtable sorting only; it doesn't matter
 264 // what order it defines, as long as it is a total, time-invariant order
 265 // Since Symbol*s are in C_HEAP, their relative order in memory never changes,
 266 // so use address comparison for speed
 267 int Symbol::fast_compare(const Symbol* other) const {
 268  return (((uintptr_t)this < (uintptr_t)other) ? -1
 269    : ((uintptr_t)this == (uintptr_t) other) ? 0 : 1);
 270 }
 271 #endif // SHARE_VM_OOPS_SYMBOL_HPP


 239   const char* as_klass_external_name(char* buf, int size) const;
 240 
 241   void metaspace_pointers_do(MetaspaceClosure* it);
 242   MetaspaceObj::Type type() const { return SymbolType; }
 243 
 244   // Printing
 245   void print_symbol_on(outputStream* st = NULL) const;
 246   void print_utf8_on(outputStream* st) const;
 247   void print_on(outputStream* st) const;         // First level print
 248   void print_value_on(outputStream* st) const;   // Second level print.
 249 
 250   // printing on default output stream
 251   void print()         { print_on(tty);       }
 252   void print_value()   { print_value_on(tty); }
 253 
 254 #ifndef PRODUCT
 255   // Empty constructor to create a dummy symbol object on stack
 256   // only for getting its vtable pointer.
 257   Symbol() { }
 258 
 259   static size_t _total_count;
 260 #endif
 261 };
 262 
 263 // Note: this comparison is used for vtable sorting only; it doesn't matter
 264 // what order it defines, as long as it is a total, time-invariant order
 265 // Since Symbol*s are in C_HEAP, their relative order in memory never changes,
 266 // so use address comparison for speed
 267 int Symbol::fast_compare(const Symbol* other) const {
 268  return (((uintptr_t)this < (uintptr_t)other) ? -1
 269    : ((uintptr_t)this == (uintptr_t) other) ? 0 : 1);
 270 }
 271 #endif // SHARE_VM_OOPS_SYMBOL_HPP
< prev index next >