Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
6939:c284cf4781f0 | 6940:18fb7da42534 |
---|---|
159 ResourceMark rm; | 159 ResourceMark rm; |
160 | 160 |
161 // If this is the first frame, and java.lang.Object.wait(...) then print out the receiver. | 161 // If this is the first frame, and java.lang.Object.wait(...) then print out the receiver. |
162 if (frame_count == 0) { | 162 if (frame_count == 0) { |
163 if (method()->name() == vmSymbols::wait_name() && | 163 if (method()->name() == vmSymbols::wait_name() && |
164 InstanceKlass::cast(method()->method_holder())->name() == vmSymbols::java_lang_Object()) { | 164 method()->method_holder()->name() == vmSymbols::java_lang_Object()) { |
165 StackValueCollection* locs = locals(); | 165 StackValueCollection* locs = locals(); |
166 if (!locs->is_empty()) { | 166 if (!locs->is_empty()) { |
167 StackValue* sv = locs->at(0); | 167 StackValue* sv = locs->at(0); |
168 if (sv->type() == T_OBJECT) { | 168 if (sv->type() == T_OBJECT) { |
169 Handle o = locs->at(0)->get_obj(); | 169 Handle o = locs->at(0)->get_obj(); |
405 | 405 |
406 while (!at_end()) { | 406 while (!at_end()) { |
407 if (Universe::reflect_invoke_cache()->is_same_method(method())) { | 407 if (Universe::reflect_invoke_cache()->is_same_method(method())) { |
408 // This is Method.invoke() -- skip it | 408 // This is Method.invoke() -- skip it |
409 } else if (use_new_reflection && | 409 } else if (use_new_reflection && |
410 Klass::cast(method()->method_holder()) | 410 method()->method_holder() |
411 ->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass())) { | 411 ->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass())) { |
412 // This is an auxilary frame -- skip it | 412 // This is an auxilary frame -- skip it |
413 } else if (method()->is_method_handle_intrinsic() || | 413 } else if (method()->is_method_handle_intrinsic() || |
414 method()->is_compiled_lambda_form()) { | 414 method()->is_compiled_lambda_form()) { |
415 // This is an internal adapter frame for method handles -- skip it | 415 // This is an internal adapter frame for method handles -- skip it |
469 | 469 |
470 | 470 |
471 void vframeStreamCommon::skip_reflection_related_frames() { | 471 void vframeStreamCommon::skip_reflection_related_frames() { |
472 while (!at_end() && | 472 while (!at_end() && |
473 (JDK_Version::is_gte_jdk14x_version() && UseNewReflection && | 473 (JDK_Version::is_gte_jdk14x_version() && UseNewReflection && |
474 (Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) || | 474 (method()->method_holder()->is_subclass_of(SystemDictionary::reflect_MethodAccessorImpl_klass()) || |
475 Klass::cast(method()->method_holder())->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) { | 475 method()->method_holder()->is_subclass_of(SystemDictionary::reflect_ConstructorAccessorImpl_klass())))) { |
476 next(); | 476 next(); |
477 } | 477 } |
478 } | 478 } |
479 | 479 |
480 | 480 |
545 } | 545 } |
546 | 546 |
547 | 547 |
548 void javaVFrame::print_value() const { | 548 void javaVFrame::print_value() const { |
549 Method* m = method(); | 549 Method* m = method(); |
550 Klass* k = m->method_holder(); | 550 InstanceKlass* k = m->method_holder(); |
551 tty->print_cr("frame( sp=" INTPTR_FORMAT ", unextended_sp=" INTPTR_FORMAT ", fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT ")", | 551 tty->print_cr("frame( sp=" INTPTR_FORMAT ", unextended_sp=" INTPTR_FORMAT ", fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT ")", |
552 _fr.sp(), _fr.unextended_sp(), _fr.fp(), _fr.pc()); | 552 _fr.sp(), _fr.unextended_sp(), _fr.fp(), _fr.pc()); |
553 tty->print("%s.%s", Klass::cast(k)->internal_name(), m->name()->as_C_string()); | 553 tty->print("%s.%s", Klass::cast(k)->internal_name(), m->name()->as_C_string()); |
554 | 554 |
555 if (!m->is_native()) { | 555 if (!m->is_native()) { |
556 Symbol* source_name = InstanceKlass::cast(k)->source_file_name(); | 556 Symbol* source_name = k->source_file_name(); |
557 int line_number = m->line_number_from_bci(bci()); | 557 int line_number = m->line_number_from_bci(bci()); |
558 if (source_name != NULL && (line_number != -1)) { | 558 if (source_name != NULL && (line_number != -1)) { |
559 tty->print("(%s:%d)", source_name->as_C_string(), line_number); | 559 tty->print("(%s:%d)", source_name->as_C_string(), line_number); |
560 } | 560 } |
561 } else { | 561 } else { |