diff -r a86c9ed78205 -r 7b146c5ebb18 hotspot/src/share/vm/oops/instanceKlass.hpp --- a/hotspot/src/share/vm/oops/instanceKlass.hpp Sun Oct 06 16:13:50 2013 +0200 +++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Mon Oct 07 12:20:28 2013 -0400 @@ -269,12 +269,18 @@ // Method array. Array* _methods; + // Default Method Array, concrete methods inherited from interfaces + Array* _default_methods; // Interface (Klass*s) this class declares locally to implement. Array* _local_interfaces; // Interface (Klass*s) this class implements transitively. Array* _transitive_interfaces; // Int array containing the original order of method in the class file (for JVMTI). Array* _method_ordering; + // Int array containing the vtable_indices for default_methods + // offset matches _default_methods offset + Array* _default_vtable_indices; + // Instance and static variable information, starts with 6-tuples of shorts // [access, name index, sig index, initval index, low_offset, high_offset] // for all fields, followed by the generic signature data at the end of @@ -356,6 +362,15 @@ void set_method_ordering(Array* m) { _method_ordering = m; } void copy_method_ordering(intArray* m, TRAPS); + // default_methods + Array* default_methods() const { return _default_methods; } + void set_default_methods(Array* a) { _default_methods = a; } + + // default method vtable_indices + Array* default_vtable_indices() const { return _default_vtable_indices; } + void set_default_vtable_indices(Array* v) { _default_vtable_indices = v; } + Array* create_new_default_vtable_indices(int len, TRAPS); + // interfaces Array* local_interfaces() const { return _local_interfaces; } void set_local_interfaces(Array* a) { @@ -501,12 +516,18 @@ Method* find_method(Symbol* name, Symbol* signature) const; static Method* find_method(Array* methods, Symbol* name, Symbol* signature); + // find a local method index in default_methods (returns -1 if not found) + static int find_method_index(Array* methods, Symbol* name, Symbol* signature); + // lookup operation (returns NULL if not found) Method* uncached_lookup_method(Symbol* name, Symbol* signature) const; // lookup a method in all the interfaces that this class implements // (returns NULL if not found) Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature) const; + // lookup a method in local defaults then in all interfaces + // (returns NULL if not found) + Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const; // Find method indices by name. If a method with the specified name is // found the index to the first method is returned, and 'end' is filled in @@ -910,6 +931,11 @@ klassItable* itable() const; // return new klassItable wrapper Method* method_at_itable(Klass* holder, int index, TRAPS); +#if INCLUDE_JVMTI + void adjust_default_methods(Method** old_methods, Method** new_methods, + int methods_length, bool* trace_name_printed); +#endif // INCLUDE_JVMTI + // Garbage collection void oop_follow_contents(oop obj); int oop_adjust_pointers(oop obj);