mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files. Reviewed-by: dholmes, coleenp, zgu
This commit is contained in:
parent
e1d995ab86
commit
7fee66f152
39 changed files with 176 additions and 179 deletions
|
@ -189,7 +189,7 @@ void JavaCalls::call_default_constructor(JavaThread* thread, methodHandle method
|
|||
assert(method->name() == vmSymbols::object_initializer_name(), "Should only be called for default constructor");
|
||||
assert(method->signature() == vmSymbols::void_method_signature(), "Should only be called for default constructor");
|
||||
|
||||
InstanceKlass* ik = InstanceKlass::cast(method->method_holder());
|
||||
InstanceKlass* ik = method->method_holder();
|
||||
if (ik->is_initialized() && ik->has_vanilla_constructor()) {
|
||||
// safe to skip constructor call
|
||||
} else {
|
||||
|
@ -344,11 +344,11 @@ void JavaCalls::call_helper(JavaValue* result, methodHandle* m, JavaCallArgument
|
|||
|
||||
|
||||
#ifdef ASSERT
|
||||
{ Klass* holder = method->method_holder();
|
||||
{ InstanceKlass* holder = method->method_holder();
|
||||
// A klass might not be initialized since JavaCall's might be used during the executing of
|
||||
// the <clinit>. For example, a Thread.start might start executing on an object that is
|
||||
// not fully initialized! (bad Java programming style)
|
||||
assert(InstanceKlass::cast(holder)->is_linked(), "rewritting must have taken place");
|
||||
assert(holder->is_linked(), "rewritting must have taken place");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue