#include <symbolTable.hpp>
Inheritance diagram for symbolTable:
Public Member Functions | |
symbolTable () | |
symbolOop | lookup (char *name, int len) |
bool | is_present (symbolOop sym) |
void | add (symbolOop s) |
void | follow_used_symbols () |
void | switch_pointers (oop from, oop to) |
void | relocate () |
void | verify () |
symbolTableLink * | new_link (symbolOop s, symbolTableLink *n=NULL) |
void | delete_link (symbolTableLink *l) |
void | print_histogram () |
Public Attributes | |
friend | bootstrap |
Protected Member Functions | |
void | add_symbol (symbolOop s) |
symbolOop | basic_add (char *name, int len, int hashValue) |
symbolOop | basic_add (symbolOop s, int hashValue) |
symbolTableEntry * | bucketFor (int hashValue) |
symbolTableEntry * | firstBucket () |
symbolTableEntry * | lastBucket () |
Private Attributes | |
symbolTableEntry | buckets [symbol_table_size] |
symbolTableLink * | free_list |
symbolTableLink * | first_free_link |
symbolTableLink * | end_block |
Definition at line 71 of file symbolTable.hpp.
symbolTable::symbolTable | ( | ) |
Definition at line 65 of file symbolTable.cpp.
References buckets, end_block, first_free_link, free_list, and symbol_table_size.
void symbolTable::add | ( | symbolOop | s | ) |
Definition at line 104 of file symbolTable.cpp.
References assert, basic_add(), byteArrayOopDesc::bytes(), hash(), memOopDesc::is_old(), oopDesc::is_symbol(), and byteArrayOopDesc::length().
Here is the call graph for this function:
void symbolTable::add_symbol | ( | symbolOop | s | ) | [protected] |
Definition at line 112 of file symbolTable.cpp.
References basic_add(), byteArrayOopDesc::bytes(), hash(), and byteArrayOopDesc::length().
Referenced by bootstrap::insert_symbol().
Here is the call graph for this function:
Definition at line 116 of file symbolTable.cpp.
References assert, bucketFor(), markOopDesc::has_valid_hash(), byteArrayOopDesc::hash_value(), memOopDesc::is_old(), oopDesc::is_symbol(), memOopDesc::mark(), new_link(), markOopDesc::set_hash(), memOopDesc::set_mark(), and Universe::symbol_table.
Here is the call graph for this function:
symbolOop symbolTable::basic_add | ( | char * | name, | |
int | len, | |||
int | hashValue | |||
) | [protected] |
Definition at line 70 of file symbolTable.cpp.
References symbolKlass::allocateSymbol(), klassOopDesc::klass_part(), and Universe::symbolKlassObj().
Referenced by add(), add_symbol(), and lookup().
Here is the call graph for this function:
symbolTableEntry* symbolTable::bucketFor | ( | int | hashValue | ) | [inline, protected] |
Definition at line 92 of file symbolTable.hpp.
References assert, buckets, and symbol_table_size.
Referenced by basic_add(), is_present(), and lookup().
void symbolTable::delete_link | ( | symbolTableLink * | l | ) |
Definition at line 271 of file symbolTable.cpp.
References free_list, and symbolTableLink::next.
Referenced by symbolTableEntry::deallocate(), and follow_used_symbols().
symbolTableEntry* symbolTable::firstBucket | ( | ) | [inline, protected] |
void symbolTable::follow_used_symbols | ( | ) |
Definition at line 155 of file symbolTable.cpp.
References delete_link(), MarkSweep::follow_root(), FOR_ALL_ENTRIES, symbolTableEntry::get_link(), symbolTableEntry::get_symbol(), memOopDesc::is_gc_marked(), symbolTableEntry::is_symbol(), symbolTableLink::next, symbolTableEntry::set_symbol(), and symbolTableLink::symbol.
Referenced by MarkSweep::mark_sweep_phase1().
Here is the call graph for this function:
Definition at line 77 of file symbolTable.cpp.
References bucketFor(), byteArrayOopDesc::bytes(), byteArrayOopDesc::equals(), symbolTableEntry::get_link(), symbolTableEntry::get_symbol(), hash(), symbolTableEntry::is_empty(), symbolTableEntry::is_symbol(), byteArrayOopDesc::length(), and symbolTableLink::next.
Here is the call graph for this function:
symbolTableEntry* symbolTable::lastBucket | ( | ) | [inline, protected] |
symbolOop symbolTable::lookup | ( | char * | name, | |
int | len | |||
) |
Definition at line 90 of file symbolTable.cpp.
References basic_add(), bucketFor(), byteArrayOopDesc::equals(), symbolTableEntry::get_link(), symbolTableEntry::get_symbol(), hash(), symbolTableEntry::is_empty(), symbolTableEntry::is_symbol(), and symbolTableLink::next.
Referenced by oopFactory::new_symbol(), PRIM_DECL_1(), and symbolOopDesc::verify().
Here is the call graph for this function:
symbolTableLink * symbolTable::new_link | ( | symbolOop | s, | |
symbolTableLink * | n = NULL | |||
) |
Definition at line 253 of file symbolTable.cpp.
References end_block, first_free_link, free_list, NEW_C_HEAP_ARRAY, symbolTableLink::next, and symbolTableLink::symbol.
Referenced by basic_add().
void symbolTable::print_histogram | ( | ) |
Definition at line 281 of file symbolTable.cpp.
References buckets, counter, lprintf(), max(), min(), and symbol_table_size.
Here is the call graph for this function:
void symbolTable::relocate | ( | ) |
Definition at line 219 of file symbolTable.cpp.
References FOR_ALL_ENTRIES, FOR_ALL_SYMBOL_ADDR, and RELOCATE_TEMPLATE.
Definition at line 143 of file symbolTable.cpp.
References assert, FOR_ALL_ENTRIES, FOR_ALL_SYMBOL_ADDR, oopDesc::is_symbol(), and SWITCH_POINTERS_TEMPLATE.
Referenced by Universe::switch_pointers().
Here is the call graph for this function:
void symbolTable::verify | ( | ) |
Definition at line 212 of file symbolTable.cpp.
References buckets, lprintf(), and symbol_table_size.
Referenced by Universe::verify().
Here is the call graph for this function:
friend symbolTable::bootstrap |
Definition at line 114 of file symbolTable.hpp.
Definition at line 74 of file symbolTable.hpp.
Referenced by bucketFor(), firstBucket(), lastBucket(), print_histogram(), symbolTable(), and verify().
symbolTableLink* symbolTable::end_block [private] |
symbolTableLink* symbolTable::first_free_link [private] |
symbolTableLink* symbolTable::free_list [private] |
Definition at line 75 of file symbolTable.hpp.
Referenced by delete_link(), new_link(), and symbolTable().