comparison src/share/vm/classfile/verifier.cpp @ 10265:92ef81e2f571

8003557: NPG: Klass* const k should be const Klass* k. Summary: With NPG, const KlassOop klass which is in fact a definition converted to Klass* const, which is not the original intention. The right usage is converting them to const Klass*. Reviewed-by: coleenp, kvn Contributed-by: yumin.qi@oracle.com
author minqi
date Fri, 10 May 2013 08:27:30 -0700
parents 09b0d3e9ba6c
children 76482cbba706
comparison
equal deleted inserted replaced
10262:c272092594bd 10265:92ef81e2f571
360 _type.print_on(str); 360 _type.print_on(str);
361 str->print("}"); 361 str->print("}");
362 } 362 }
363 #endif 363 #endif
364 364
365 void ErrorContext::details(outputStream* ss, Method* method) const { 365 void ErrorContext::details(outputStream* ss, const Method* method) const {
366 if (is_valid()) { 366 if (is_valid()) {
367 ss->print_cr(""); 367 ss->print_cr("");
368 ss->print_cr("Exception Details:"); 368 ss->print_cr("Exception Details:");
369 location_details(ss, method); 369 location_details(ss, method);
370 reason_details(ss); 370 reason_details(ss);
433 ss->print_cr("Unknown"); 433 ss->print_cr("Unknown");
434 } 434 }
435 ss->print_cr(""); 435 ss->print_cr("");
436 } 436 }
437 437
438 void ErrorContext::location_details(outputStream* ss, Method* method) const { 438 void ErrorContext::location_details(outputStream* ss, const Method* method) const {
439 if (_bci != -1 && method != NULL) { 439 if (_bci != -1 && method != NULL) {
440 streamIndentor si(ss); 440 streamIndentor si(ss);
441 const char* bytecode_name = "<invalid>"; 441 const char* bytecode_name = "<invalid>";
442 if (method->validate_bci_from_bcx(_bci) != -1) { 442 if (method->validate_bci_from_bcx(_bci) != -1) {
443 Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci)); 443 Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci));
468 streamIndentor si2(ss); 468 streamIndentor si2(ss);
469 _expected.frame()->print_on(ss); 469 _expected.frame()->print_on(ss);
470 } 470 }
471 } 471 }
472 472
473 void ErrorContext::bytecode_details(outputStream* ss, Method* method) const { 473 void ErrorContext::bytecode_details(outputStream* ss, const Method* method) const {
474 if (method != NULL) { 474 if (method != NULL) {
475 streamIndentor si(ss); 475 streamIndentor si(ss);
476 ss->indent().print_cr("Bytecode:"); 476 ss->indent().print_cr("Bytecode:");
477 streamIndentor si2(ss); 477 streamIndentor si2(ss);
478 ss->print_data(method->code_base(), method->code_size(), false); 478 ss->print_data(method->code_base(), method->code_size(), false);
479 } 479 }
480 } 480 }
481 481
482 void ErrorContext::handler_details(outputStream* ss, Method* method) const { 482 void ErrorContext::handler_details(outputStream* ss, const Method* method) const {
483 if (method != NULL) { 483 if (method != NULL) {
484 streamIndentor si(ss); 484 streamIndentor si(ss);
485 ExceptionTable table(method); 485 ExceptionTable table(method);
486 if (table.length() > 0) { 486 if (table.length() > 0) {
487 ss->indent().print_cr("Exception Handler Table:"); 487 ss->indent().print_cr("Exception Handler Table:");
492 } 492 }
493 } 493 }
494 } 494 }
495 } 495 }
496 496
497 void ErrorContext::stackmap_details(outputStream* ss, Method* method) const { 497 void ErrorContext::stackmap_details(outputStream* ss, const Method* method) const {
498 if (method != NULL && method->has_stackmap_table()) { 498 if (method != NULL && method->has_stackmap_table()) {
499 streamIndentor si(ss); 499 streamIndentor si(ss);
500 ss->indent().print_cr("Stackmap Table:"); 500 ss->indent().print_cr("Stackmap Table:");
501 Array<u1>* data = method->stackmap_data(); 501 Array<u1>* data = method->stackmap_data();
502 stack_map_table* sm_table = 502 stack_map_table* sm_table =