Mercurial > hg > truffle
diff src/share/vm/interpreter/linkResolver.cpp @ 6940:18fb7da42534
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Summary: Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files.
Reviewed-by: dholmes, coleenp, zgu
Contributed-by: harold.seigel@oracle.com
author | coleenp |
---|---|
date | Tue, 06 Nov 2012 15:09:37 -0500 |
parents | 4735d2c84362 |
children | 070d523b96a7 |
line wrap: on
line diff
--- a/src/share/vm/interpreter/linkResolver.cpp Thu Oct 04 14:55:57 2012 +0200 +++ b/src/share/vm/interpreter/linkResolver.cpp Tue Nov 06 15:09:37 2012 -0500 @@ -133,7 +133,7 @@ // don't force compilation, resolve was on behalf of compiler return; } - if (InstanceKlass::cast(selected_method->method_holder())->is_not_initialized()) { + if (selected_method->method_holder()->is_not_initialized()) { // 'is_not_initialized' means not only '!is_initialized', but also that // initialization has not been started yet ('!being_initialized') // Do not force compilation of methods in uninitialized classes. @@ -466,7 +466,7 @@ // check loader constraints Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader()); - Handle class_loader (THREAD, InstanceKlass::cast(resolved_method->method_holder())->class_loader()); + Handle class_loader (THREAD, resolved_method->method_holder()->class_loader()); { ResourceMark rm(THREAD); char* failed_type_name = @@ -528,7 +528,7 @@ if (check_access) { HandleMark hm(THREAD); Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader()); - Handle class_loader (THREAD, InstanceKlass::cast(resolved_method->method_holder())->class_loader()); + Handle class_loader (THREAD, resolved_method->method_holder()->class_loader()); { ResourceMark rm(THREAD); char* failed_type_name = @@ -910,12 +910,12 @@ // Virtual methods cannot be resolved before its klass has been linked, for otherwise the Method*'s // has not been rewritten, and the vtable initialized. - assert(InstanceKlass::cast(resolved_method->method_holder())->is_linked(), "must be linked"); + assert(resolved_method->method_holder()->is_linked(), "must be linked"); // Virtual methods cannot be resolved before its klass has been linked, for otherwise the Method*'s // has not been rewritten, and the vtable initialized. Make sure to do this after the nullcheck, since // a missing receiver might result in a bogus lookup. - assert(InstanceKlass::cast(resolved_method->method_holder())->is_linked(), "must be linked"); + assert(resolved_method->method_holder()->is_linked(), "must be linked"); // do lookup based on receiver klass using the vtable index if (resolved_method->method_holder()->is_interface()) { // miranda method