mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8214728: Unnecessary InstanceKlass::cast at few places
Reviewed-by: lfoltan, jiangli, coleenp
This commit is contained in:
parent
3d0ccc7ec9
commit
4e935d302a
3 changed files with 3 additions and 4 deletions
|
@ -2017,8 +2017,7 @@ Klass* ClassVerifier::load_class(Symbol* name, TRAPS) {
|
||||||
if (kls != NULL) {
|
if (kls != NULL) {
|
||||||
current_class()->class_loader_data()->record_dependency(kls);
|
current_class()->class_loader_data()->record_dependency(kls);
|
||||||
if (log_is_enabled(Debug, class, resolve)) {
|
if (log_is_enabled(Debug, class, resolve)) {
|
||||||
InstanceKlass* cur_class = InstanceKlass::cast(current_class());
|
Verifier::trace_class_resolution(kls, current_class());
|
||||||
Verifier::trace_class_resolution(kls, cur_class);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return kls;
|
return kls;
|
||||||
|
|
|
@ -728,7 +728,7 @@ void InterpreterRuntime::resolve_get_put(JavaThread* thread, Bytecodes::Code byt
|
||||||
// class is initialized. This is required so that access to the static
|
// class is initialized. This is required so that access to the static
|
||||||
// field will call the initialization function every time until the class
|
// field will call the initialization function every time until the class
|
||||||
// is completely initialized ala. in 2.17.5 in JVM Specification.
|
// is completely initialized ala. in 2.17.5 in JVM Specification.
|
||||||
InstanceKlass* klass = InstanceKlass::cast(info.field_holder());
|
InstanceKlass* klass = info.field_holder();
|
||||||
bool uninitialized_static = is_static && !klass->is_initialized();
|
bool uninitialized_static = is_static && !klass->is_initialized();
|
||||||
bool has_initialized_final_update = info.field_holder()->major_version() >= 53 &&
|
bool has_initialized_final_update = info.field_holder()->major_version() >= 53 &&
|
||||||
info.has_initialized_final_update();
|
info.has_initialized_final_update();
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ methodHandle LinkResolver::linktime_resolve_special_method(const LinkInfo& link_
|
||||||
InstanceKlass* ck = InstanceKlass::cast(current_klass);
|
InstanceKlass* ck = InstanceKlass::cast(current_klass);
|
||||||
InstanceKlass *klass_to_check = !ck->is_unsafe_anonymous() ?
|
InstanceKlass *klass_to_check = !ck->is_unsafe_anonymous() ?
|
||||||
ck :
|
ck :
|
||||||
InstanceKlass::cast(ck->unsafe_anonymous_host());
|
ck->unsafe_anonymous_host();
|
||||||
// Disable verification for the dynamically-generated reflection bytecodes.
|
// Disable verification for the dynamically-generated reflection bytecodes.
|
||||||
bool is_reflect = klass_to_check->is_subclass_of(
|
bool is_reflect = klass_to_check->is_subclass_of(
|
||||||
SystemDictionary::reflect_MagicAccessorImpl_klass());
|
SystemDictionary::reflect_MagicAccessorImpl_klass());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue