Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jvmtiClassFileReconstituter.cpp @ 10213:c456f4510385
8008453: JvmtiClassFileReconstituter does not recognize default methods
Reviewed-by: acorn, sspitsyn
author | sla |
---|---|
date | Fri, 03 May 2013 12:24:11 +0200 |
parents | 8aaef2cee3b2 |
children | 187154b7a226 |
comparison
equal
deleted
inserted
replaced
10167:8fe2542bdc8d | 10213:c456f4510385 |
---|---|
511 u2 generic_signature_index = const_method->generic_signature_index(); | 511 u2 generic_signature_index = const_method->generic_signature_index(); |
512 AnnotationArray* anno = method->annotations(); | 512 AnnotationArray* anno = method->annotations(); |
513 AnnotationArray* param_anno = method->parameter_annotations(); | 513 AnnotationArray* param_anno = method->parameter_annotations(); |
514 AnnotationArray* default_anno = method->annotation_default(); | 514 AnnotationArray* default_anno = method->annotation_default(); |
515 | 515 |
516 // skip generated default interface methods | |
517 if (method->is_overpass()) { | |
518 return; | |
519 } | |
520 | |
516 write_u2(access_flags.get_flags() & JVM_RECOGNIZED_METHOD_MODIFIERS); | 521 write_u2(access_flags.get_flags() & JVM_RECOGNIZED_METHOD_MODIFIERS); |
517 write_u2(const_method->name_index()); | 522 write_u2(const_method->name_index()); |
518 write_u2(const_method->signature_index()); | 523 write_u2(const_method->signature_index()); |
519 | 524 |
520 // write attributes in the same order javac does, so we can test with byte for | 525 // write attributes in the same order javac does, so we can test with byte for |
617 // JVMSpec| method_info methods[methods_count]; | 622 // JVMSpec| method_info methods[methods_count]; |
618 void JvmtiClassFileReconstituter::write_method_infos() { | 623 void JvmtiClassFileReconstituter::write_method_infos() { |
619 HandleMark hm(thread()); | 624 HandleMark hm(thread()); |
620 Array<Method*>* methods = ikh()->methods(); | 625 Array<Method*>* methods = ikh()->methods(); |
621 int num_methods = methods->length(); | 626 int num_methods = methods->length(); |
622 | 627 int num_overpass = 0; |
623 write_u2(num_methods); | 628 |
629 // count the generated default interface methods | |
630 // these will not be re-created by write_method_info | |
631 // and should not be included in the total count | |
632 for (int index = 0; index < num_methods; index++) { | |
633 Method* method = methods->at(index); | |
634 if (method->is_overpass()) { | |
635 num_overpass++; | |
636 } | |
637 } | |
638 | |
639 write_u2(num_methods - num_overpass); | |
624 if (JvmtiExport::can_maintain_original_method_order()) { | 640 if (JvmtiExport::can_maintain_original_method_order()) { |
625 int index; | 641 int index; |
626 int original_index; | 642 int original_index; |
627 intArray method_order(num_methods, 0); | 643 intArray method_order(num_methods, 0); |
628 | 644 |