< prev index next >

src/share/vm/classfile/symbolTable.hpp

Print this page




 148 
 149   static void create_table() {
 150     assert(_the_table == NULL, "One symbol table allowed.");
 151     _the_table = new SymbolTable();
 152     initialize_symbols(symbol_alloc_arena_size);
 153   }
 154 
 155   static unsigned int hash_symbol(const char* s, int len);
 156 
 157   static Symbol* lookup(const char* name, int len, TRAPS);
 158   // lookup only, won't add. Also calculate hash.
 159   static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
 160   // Only copy to C string to be added if lookup failed.
 161   static Symbol* lookup(const Symbol* sym, int begin, int end, TRAPS);
 162 
 163   static void release(Symbol* sym);
 164 
 165   // Look up the address of the literal in the SymbolTable for this Symbol*
 166   static Symbol** lookup_symbol_addr(Symbol* sym);
 167 
 168   // jchar (utf16) version of lookups
 169   static Symbol* lookup_unicode(const jchar* name, int len, TRAPS);
 170   static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
 171 
 172   static void add(ClassLoaderData* loader_data,
 173                   constantPoolHandle cp, int names_count,
 174                   const char** names, int* lengths, int* cp_indices,
 175                   unsigned int* hashValues, TRAPS);
 176 
 177   // Release any dead symbols
 178   static void unlink() {
 179     int processed = 0;
 180     int removed = 0;
 181     unlink(&processed, &removed);
 182   }
 183   static void unlink(int* processed, int* removed);
 184   // Release any dead symbols, possibly parallel version
 185   static void possibly_parallel_unlink(int* processed, int* removed);
 186 
 187   // iterate over symbols
 188   static void symbols_do(SymbolClosure *cl);




 148 
 149   static void create_table() {
 150     assert(_the_table == NULL, "One symbol table allowed.");
 151     _the_table = new SymbolTable();
 152     initialize_symbols(symbol_alloc_arena_size);
 153   }
 154 
 155   static unsigned int hash_symbol(const char* s, int len);
 156 
 157   static Symbol* lookup(const char* name, int len, TRAPS);
 158   // lookup only, won't add. Also calculate hash.
 159   static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
 160   // Only copy to C string to be added if lookup failed.
 161   static Symbol* lookup(const Symbol* sym, int begin, int end, TRAPS);
 162 
 163   static void release(Symbol* sym);
 164 
 165   // Look up the address of the literal in the SymbolTable for this Symbol*
 166   static Symbol** lookup_symbol_addr(Symbol* sym);
 167 
 168   // jchar (UTF16) version of lookups
 169   static Symbol* lookup_unicode(const jchar* name, int len, TRAPS);
 170   static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
 171 
 172   static void add(ClassLoaderData* loader_data,
 173                   constantPoolHandle cp, int names_count,
 174                   const char** names, int* lengths, int* cp_indices,
 175                   unsigned int* hashValues, TRAPS);
 176 
 177   // Release any dead symbols
 178   static void unlink() {
 179     int processed = 0;
 180     int removed = 0;
 181     unlink(&processed, &removed);
 182   }
 183   static void unlink(int* processed, int* removed);
 184   // Release any dead symbols, possibly parallel version
 185   static void possibly_parallel_unlink(int* processed, int* removed);
 186 
 187   // iterate over symbols
 188   static void symbols_do(SymbolClosure *cl);


< prev index next >