hotspot/src/share/vm/classfile/stringTable.cpp
changeset 33105 294e48b4f704
parent 31345 1bba15125d8d
child 33148 68fa8b6c4340
equal deleted inserted replaced
33104:a7c0f60a1294 33105:294e48b4f704
   310 
   310 
   311 void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
   311 void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
   312   const int limit = the_table()->table_size();
   312   const int limit = the_table()->table_size();
   313 
   313 
   314   assert(0 <= start_idx && start_idx <= limit,
   314   assert(0 <= start_idx && start_idx <= limit,
   315          err_msg("start_idx (%d) is out of bounds", start_idx));
   315          "start_idx (%d) is out of bounds", start_idx);
   316   assert(0 <= end_idx && end_idx <= limit,
   316   assert(0 <= end_idx && end_idx <= limit,
   317          err_msg("end_idx (%d) is out of bounds", end_idx));
   317          "end_idx (%d) is out of bounds", end_idx);
   318   assert(start_idx <= end_idx,
   318   assert(start_idx <= end_idx,
   319          err_msg("Index ordering: start_idx=%d, end_idx=%d",
   319          "Index ordering: start_idx=%d, end_idx=%d",
   320                  start_idx, end_idx));
   320          start_idx, end_idx);
   321 
   321 
   322   for (int i = start_idx; i < end_idx; i += 1) {
   322   for (int i = start_idx; i < end_idx; i += 1) {
   323     HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
   323     HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
   324     while (entry != NULL) {
   324     while (entry != NULL) {
   325       assert(!entry->is_shared(), "CDS not used for the StringTable");
   325       assert(!entry->is_shared(), "CDS not used for the StringTable");
   333 
   333 
   334 void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
   334 void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
   335   const int limit = the_table()->table_size();
   335   const int limit = the_table()->table_size();
   336 
   336 
   337   assert(0 <= start_idx && start_idx <= limit,
   337   assert(0 <= start_idx && start_idx <= limit,
   338          err_msg("start_idx (%d) is out of bounds", start_idx));
   338          "start_idx (%d) is out of bounds", start_idx);
   339   assert(0 <= end_idx && end_idx <= limit,
   339   assert(0 <= end_idx && end_idx <= limit,
   340          err_msg("end_idx (%d) is out of bounds", end_idx));
   340          "end_idx (%d) is out of bounds", end_idx);
   341   assert(start_idx <= end_idx,
   341   assert(start_idx <= end_idx,
   342          err_msg("Index ordering: start_idx=%d, end_idx=%d",
   342          "Index ordering: start_idx=%d, end_idx=%d",
   343                  start_idx, end_idx));
   343          start_idx, end_idx);
   344 
   344 
   345   for (int i = start_idx; i < end_idx; ++i) {
   345   for (int i = start_idx; i < end_idx; ++i) {
   346     HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
   346     HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
   347     HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
   347     HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
   348     while (entry != NULL) {
   348     while (entry != NULL) {