mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8026977: NPG: Remove ConstantPool::lock
Write klass and resolved_references constant pool fields lock free. Reviewed-by: jrose, twisti
This commit is contained in:
parent
c1c9f333d5
commit
243d697d71
10 changed files with 127 additions and 180 deletions
|
@ -510,7 +510,7 @@ constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) {
|
|||
jbyte tag = cp->tag_at(index).value();
|
||||
switch (tag) {
|
||||
case JVM_CONSTANT_UnresolvedClass: {
|
||||
Symbol* class_name = cp->unresolved_klass_at(index);
|
||||
Symbol* class_name = cp->klass_name_at(index);
|
||||
// check the name, even if _cp_patches will overwrite it
|
||||
verify_legal_class_name(class_name, CHECK_(nullHandle));
|
||||
break;
|
||||
|
@ -3161,7 +3161,7 @@ instanceKlassHandle ClassFileParser::parse_super_class(int super_class_index,
|
|||
if (_need_verify)
|
||||
is_array = super_klass->oop_is_array();
|
||||
} else if (_need_verify) {
|
||||
is_array = (_cp->unresolved_klass_at(super_class_index)->byte_at(0) == JVM_SIGNATURE_ARRAY);
|
||||
is_array = (_cp->klass_name_at(super_class_index)->byte_at(0) == JVM_SIGNATURE_ARRAY);
|
||||
}
|
||||
if (_need_verify) {
|
||||
guarantee_property(!is_array,
|
||||
|
@ -3855,7 +3855,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
|
|||
"Invalid this class index %u in constant pool in class file %s",
|
||||
this_class_index, CHECK_(nullHandle));
|
||||
|
||||
Symbol* class_name = cp->unresolved_klass_at(this_class_index);
|
||||
Symbol* class_name = cp->klass_name_at(this_class_index);
|
||||
assert(class_name != NULL, "class_name can't be null");
|
||||
|
||||
// It's important to set parsed_name *before* resolving the super class.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue