Mercurial > hg > graal-compiler
diff src/share/vm/runtime/vframe.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 | da91efe96a93 |
children | e522a00b91aa 070d523b96a7 |
line wrap: on
line diff
--- a/src/share/vm/runtime/vframe.cpp Thu Oct 04 14:55:57 2012 +0200 +++ b/src/share/vm/runtime/vframe.cpp Tue Nov 06 15:09:37 2012 -0500 @@ -161,7 +161,7 @@ // If this is the first frame, and java.lang.Object.wait(...) then print out the receiver. if (frame_count == 0) { if (method()->name() == vmSymbols::wait_name() && - InstanceKlass::cast(method()->method_holder())->name() == vmSymbols::java_lang_Object()) { + method()->method_holder()->name() == vmSymbols::java_lang_Object()) { StackValueCollection* locs = locals(); if (!locs->is_empty()) { StackValue* sv = locs->at(0); @@ -407,7 +407,7 @@ if (Universe::reflect_invoke_cache()->is_same_method(method())) { // This is Method.invoke() -- skip it } else if (use_new_reflection && - Klass::cast(method()->method_holder()) + method()->method_holder() ->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass())) { // This is an auxilary frame -- skip it } else if (method()->is_method_handle_intrinsic() || @@ -471,8 +471,8 @@ void vframeStreamCommon::skip_reflection_related_frames() { while (!at_end() && (JDK_Version::is_gte_jdk14x_version() && UseNewReflection && - (Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) || - Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) { + (method()->method_holder()->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) || + method()->method_holder()->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) { next(); } } @@ -547,13 +547,13 @@ void javaVFrame::print_value() const { Method* m = method(); - Klass* k = m->method_holder(); + InstanceKlass* k = m->method_holder(); tty->print_cr("frame( sp=" INTPTR_FORMAT ", unextended_sp=" INTPTR_FORMAT ", fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT ")", _fr.sp(), _fr.unextended_sp(), _fr.fp(), _fr.pc()); tty->print("%s.%s", Klass::cast(k)->internal_name(), m->name()->as_C_string()); if (!m->is_native()) { - Symbol* source_name = InstanceKlass::cast(k)->source_file_name(); + Symbol* source_name = k->source_file_name(); int line_number = m->line_number_from_bci(bci()); if (source_name != NULL && (line_number != -1)) { tty->print("(%s:%d)", source_name->as_C_string(), line_number);