hotspot/src/share/vm/oops/constantPoolOop.cpp
changeset 8651 81b517a9249f
parent 8076 96d498ec7ae1
child 8725 8c1e3dd5fe1b
equal deleted inserted replaced
8650:45f6a91a52de 8651:81b517a9249f
  1173     to_cp->string_index_at_put(to_i, si);
  1173     to_cp->string_index_at_put(to_i, si);
  1174   } break;
  1174   } break;
  1175 
  1175 
  1176   case JVM_CONSTANT_UnresolvedClass:
  1176   case JVM_CONSTANT_UnresolvedClass:
  1177   {
  1177   {
  1178     Symbol* k = from_cp->unresolved_klass_at(from_i);
  1178     // Can be resolved after checking tag, so check the slot first.
  1179     to_cp->unresolved_klass_at_put(to_i, k);
  1179     CPSlot entry = from_cp->slot_at(from_i);
       
  1180     if (entry.is_oop()) {
       
  1181       assert(entry.get_oop()->is_klass(), "must be");
       
  1182       // Already resolved
       
  1183       to_cp->klass_at_put(to_i, (klassOop)entry.get_oop());
       
  1184     } else {
       
  1185       to_cp->unresolved_klass_at_put(to_i, entry.get_symbol());
       
  1186     }
  1180   } break;
  1187   } break;
  1181 
  1188 
  1182   case JVM_CONSTANT_UnresolvedClassInError:
  1189   case JVM_CONSTANT_UnresolvedClassInError:
  1183   {
  1190   {
  1184     Symbol* k = from_cp->unresolved_klass_at(from_i);
  1191     Symbol* k = from_cp->unresolved_klass_at(from_i);
  1187   } break;
  1194   } break;
  1188 
  1195 
  1189 
  1196 
  1190   case JVM_CONSTANT_UnresolvedString:
  1197   case JVM_CONSTANT_UnresolvedString:
  1191   {
  1198   {
  1192     Symbol* s = from_cp->unresolved_string_at(from_i);
  1199     // Can be resolved after checking tag, so check the slot first.
  1193     to_cp->unresolved_string_at_put(to_i, s);
  1200     CPSlot entry = from_cp->slot_at(from_i);
       
  1201     if (entry.is_oop()) {
       
  1202       // Already resolved (either string or pseudo-string)
       
  1203       to_cp->string_at_put(to_i, entry.get_oop());
       
  1204     } else {
       
  1205       to_cp->unresolved_string_at_put(to_i, entry.get_symbol());
       
  1206     }
  1194   } break;
  1207   } break;
  1195 
  1208 
  1196   case JVM_CONSTANT_Utf8:
  1209   case JVM_CONSTANT_Utf8:
  1197   {
  1210   {
  1198     Symbol* s = from_cp->symbol_at(from_i);
  1211     Symbol* s = from_cp->symbol_at(from_i);