502 Klass* ConstantPool::klass_ref_at(int which, TRAPS) { |
502 Klass* ConstantPool::klass_ref_at(int which, TRAPS) { |
503 return klass_at(klass_ref_index_at(which), THREAD); |
503 return klass_at(klass_ref_index_at(which), THREAD); |
504 } |
504 } |
505 |
505 |
506 |
506 |
507 Symbol* ConstantPool::klass_name_at(int which) { |
507 Symbol* ConstantPool::klass_name_at(int which) const { |
508 assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass(), |
508 assert(tag_at(which).is_unresolved_klass() || tag_at(which).is_klass(), |
509 "Corrupted constant pool"); |
509 "Corrupted constant pool"); |
510 // A resolved constantPool entry will contain a Klass*, otherwise a Symbol*. |
510 // A resolved constantPool entry will contain a Klass*, otherwise a Symbol*. |
511 // It is not safe to rely on the tag bit's here, since we don't have a lock, and the entry and |
511 // It is not safe to rely on the tag bit's here, since we don't have a lock, and the entry and |
512 // tag is not updated atomicly. |
512 // tag is not updated atomicly. |