Mercurial > hg > graal-compiler
comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 12823:ac9cb1d5a202
8009130: Lambda: Fix access controls, loader constraints.
Summary: New default methods list with inherited superinterface methods
Reviewed-by: minqi, sspitsyn, coleenp
author | acorn |
---|---|
date | Mon, 07 Oct 2013 12:20:28 -0400 |
parents | 07f8c2a453f8 |
children | f9508a2fd4d8 |
comparison
equal
deleted
inserted
replaced
12822:cc4f5f8d885e | 12823:ac9cb1d5a202 |
---|---|
2753 // Fix the vtable embedded in the_class and subclasses of the_class, | 2753 // Fix the vtable embedded in the_class and subclasses of the_class, |
2754 // if one exists. We discard scratch_class and we don't keep an | 2754 // if one exists. We discard scratch_class and we don't keep an |
2755 // InstanceKlass around to hold obsolete methods so we don't have | 2755 // InstanceKlass around to hold obsolete methods so we don't have |
2756 // any other InstanceKlass embedded vtables to update. The vtable | 2756 // any other InstanceKlass embedded vtables to update. The vtable |
2757 // holds the Method*s for virtual (but not final) methods. | 2757 // holds the Method*s for virtual (but not final) methods. |
2758 if (ik->vtable_length() > 0 && ik->is_subtype_of(_the_class_oop)) { | 2758 // Default methods, or concrete methods in interfaces are stored |
2759 // in the vtable, so if an interface changes we need to check | |
2760 // adjust_method_entries() for every InstanceKlass, which will also | |
2761 // adjust the default method vtable indices. | |
2762 // We also need to adjust any default method entries that are | |
2763 // not yet in the vtable, because the vtable setup is in progress. | |
2764 // This must be done after we adjust the default_methods and | |
2765 // default_vtable_indices for methods already in the vtable. | |
2766 if (ik->vtable_length() > 0 && (_the_class_oop->is_interface() | |
2767 || ik->is_subtype_of(_the_class_oop))) { | |
2759 // ik->vtable() creates a wrapper object; rm cleans it up | 2768 // ik->vtable() creates a wrapper object; rm cleans it up |
2760 ResourceMark rm(_thread); | 2769 ResourceMark rm(_thread); |
2761 ik->vtable()->adjust_method_entries(_matching_old_methods, | 2770 ik->vtable()->adjust_method_entries(_matching_old_methods, |
2762 _matching_new_methods, | 2771 _matching_new_methods, |
2763 _matching_methods_length, | 2772 _matching_methods_length, |
2764 &trace_name_printed); | 2773 &trace_name_printed); |
2774 ik->adjust_default_methods(_matching_old_methods, | |
2775 _matching_new_methods, | |
2776 _matching_methods_length, | |
2777 &trace_name_printed); | |
2765 } | 2778 } |
2766 | 2779 |
2767 // If the current class has an itable and we are either redefining an | 2780 // If the current class has an itable and we are either redefining an |
2768 // interface or if the current class is a subclass of the_class, then | 2781 // interface or if the current class is a subclass of the_class, then |
2769 // we potentially have to fix the itable. If we are redefining an | 2782 // we potentially have to fix the itable. If we are redefining an |