mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8264142: Remove TRAPS/THREAD parameters for verifier related functions
Reviewed-by: gziemski, coleenp, iklam, dholmes
This commit is contained in:
parent
aefc1560b5
commit
19a6ac46ce
8 changed files with 46 additions and 52 deletions
|
@ -1240,8 +1240,7 @@ static void parse_annotations(const ConstantPool* const cp,
|
|||
const u1* buffer, int limit,
|
||||
AnnotationCollector* coll,
|
||||
ClassLoaderData* loader_data,
|
||||
const bool can_access_vm_annotations,
|
||||
TRAPS) {
|
||||
const bool can_access_vm_annotations) {
|
||||
|
||||
assert(cp != NULL, "invariant");
|
||||
assert(buffer != NULL, "invariant");
|
||||
|
@ -1418,8 +1417,7 @@ void ClassFileParser::parse_field_attributes(const ClassFileStream* const cfs,
|
|||
runtime_visible_annotations_length,
|
||||
parsed_annotations,
|
||||
_loader_data,
|
||||
_can_access_vm_annotations,
|
||||
CHECK);
|
||||
_can_access_vm_annotations);
|
||||
cfs->skip_u1_fast(runtime_visible_annotations_length);
|
||||
} else if (attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
|
||||
if (runtime_invisible_annotations_exists) {
|
||||
|
@ -2734,8 +2732,7 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
|
|||
runtime_visible_annotations_length,
|
||||
&parsed_annotations,
|
||||
_loader_data,
|
||||
_can_access_vm_annotations,
|
||||
CHECK_NULL);
|
||||
_can_access_vm_annotations);
|
||||
cfs->skip_u1_fast(runtime_visible_annotations_length);
|
||||
} else if (method_attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
|
||||
if (runtime_invisible_annotations_exists) {
|
||||
|
@ -3563,7 +3560,7 @@ u2 ClassFileParser::parse_classfile_record_attribute(const ClassFileStream* cons
|
|||
return calculate_attr_size;
|
||||
}
|
||||
|
||||
void ClassFileParser::parse_classfile_synthetic_attribute(TRAPS) {
|
||||
void ClassFileParser::parse_classfile_synthetic_attribute() {
|
||||
set_class_synthetic_flag(true);
|
||||
}
|
||||
|
||||
|
@ -3763,7 +3760,7 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
|
|||
attribute_length, THREAD);
|
||||
return;
|
||||
}
|
||||
parse_classfile_synthetic_attribute(CHECK);
|
||||
parse_classfile_synthetic_attribute();
|
||||
} else if (tag == vmSymbols::tag_deprecated()) {
|
||||
// Check for Deprecated tag - 4276120
|
||||
if (attribute_length != 0) {
|
||||
|
@ -3801,8 +3798,7 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
|
|||
runtime_visible_annotations_length,
|
||||
parsed_annotations,
|
||||
_loader_data,
|
||||
_can_access_vm_annotations,
|
||||
CHECK);
|
||||
_can_access_vm_annotations);
|
||||
cfs->skip_u1_fast(runtime_visible_annotations_length);
|
||||
} else if (tag == vmSymbols::tag_runtime_invisible_annotations()) {
|
||||
if (runtime_invisible_annotations_exists) {
|
||||
|
@ -4072,8 +4068,7 @@ void ClassFileParser::create_combined_annotations(TRAPS) {
|
|||
// Transfer ownership of metadata allocated to the InstanceKlass.
|
||||
void ClassFileParser::apply_parsed_class_metadata(
|
||||
InstanceKlass* this_klass,
|
||||
int java_fields_count,
|
||||
TRAPS) {
|
||||
int java_fields_count) {
|
||||
assert(this_klass != NULL, "invariant");
|
||||
|
||||
_cp->set_pool_holder(this_klass);
|
||||
|
@ -5418,7 +5413,7 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik,
|
|||
|
||||
// this transfers ownership of a lot of arrays from
|
||||
// the parser onto the InstanceKlass*
|
||||
apply_parsed_class_metadata(ik, _java_fields_count, CHECK);
|
||||
apply_parsed_class_metadata(ik, _java_fields_count);
|
||||
|
||||
// can only set dynamic nest-host after static nest information is set
|
||||
if (cl_inst_info.dynamic_nest_host() != NULL) {
|
||||
|
@ -5637,8 +5632,8 @@ void ClassFileParser::update_class_name(Symbol* new_class_name) {
|
|||
// For an unsafe anonymous class that is in the unnamed package, move it to its host class's
|
||||
// package by prepending its host class's package name to its class name and setting
|
||||
// its _class_name field.
|
||||
void ClassFileParser::prepend_host_package_name(const InstanceKlass* unsafe_anonymous_host, TRAPS) {
|
||||
ResourceMark rm(THREAD);
|
||||
void ClassFileParser::prepend_host_package_name(Thread* current, const InstanceKlass* unsafe_anonymous_host) {
|
||||
ResourceMark rm(current);
|
||||
assert(strrchr(_class_name->as_C_string(), JVM_SIGNATURE_SLASH) == NULL,
|
||||
"Unsafe anonymous class should not be in a package");
|
||||
TempNewSymbol host_pkg_name =
|
||||
|
@ -5674,7 +5669,7 @@ void ClassFileParser::fix_unsafe_anonymous_class_name(TRAPS) {
|
|||
const jbyte* anon_last_slash = UTF8::strrchr((const jbyte*)_class_name->base(),
|
||||
_class_name->utf8_length(), JVM_SIGNATURE_SLASH);
|
||||
if (anon_last_slash == NULL) { // Unnamed package
|
||||
prepend_host_package_name(_unsafe_anonymous_host, CHECK);
|
||||
prepend_host_package_name(THREAD, _unsafe_anonymous_host);
|
||||
} else {
|
||||
if (!_unsafe_anonymous_host->is_same_class_package(_unsafe_anonymous_host->class_loader(), _class_name)) {
|
||||
ResourceMark rm(THREAD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue