Mercurial > hg > truffle
diff src/share/vm/oops/instanceKlass.hpp @ 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 | 3374b92de2d9 |
children | b8860472c377 |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp Sun Oct 06 16:13:50 2013 +0200 +++ b/src/share/vm/oops/instanceKlass.hpp Mon Oct 07 12:20:28 2013 -0400 @@ -269,12 +269,18 @@ // Method array. Array<Method*>* _methods; + // Default Method Array, concrete methods inherited from interfaces + Array<Method*>* _default_methods; // Interface (Klass*s) this class declares locally to implement. Array<Klass*>* _local_interfaces; // Interface (Klass*s) this class implements transitively. Array<Klass*>* _transitive_interfaces; // Int array containing the original order of method in the class file (for JVMTI). Array<int>* _method_ordering; + // Int array containing the vtable_indices for default_methods + // offset matches _default_methods offset + Array<int>* _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<int>* m) { _method_ordering = m; } void copy_method_ordering(intArray* m, TRAPS); + // default_methods + Array<Method*>* default_methods() const { return _default_methods; } + void set_default_methods(Array<Method*>* a) { _default_methods = a; } + + // default method vtable_indices + Array<int>* default_vtable_indices() const { return _default_vtable_indices; } + void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; } + Array<int>* create_new_default_vtable_indices(int len, TRAPS); + // interfaces Array<Klass*>* local_interfaces() const { return _local_interfaces; } void set_local_interfaces(Array<Klass*>* a) { @@ -501,12 +516,18 @@ Method* find_method(Symbol* name, Symbol* signature) const; static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature); + // find a local method index in default_methods (returns -1 if not found) + static int find_method_index(Array<Method*>* 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);