Mercurial > hg > truffle
diff src/share/vm/oops/instanceKlass.hpp @ 13086:096c224171c4
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 20 Nov 2013 00:10:38 +0100 |
parents | cefad50507d8 b8860472c377 |
children | 02f27ecb4f3a |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp Tue Nov 19 17:44:26 2013 +0100 +++ b/src/share/vm/oops/instanceKlass.hpp Wed Nov 20 00:10:38 2013 +0100 @@ -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); @@ -995,8 +1021,9 @@ // Must be one per class and it has to be a VM internal object so java code // cannot lock it (like the mirror). // It has to be an object not a Mutex because it's held through java calls. - volatile oop init_lock() const; + oop init_lock() const; private: + void fence_and_clear_init_lock(); // Static methods that are used to implement member methods where an exposed this pointer // is needed due to possible GCs