src/share/vm/oops/instanceKlass.hpp

changeset 5848
ac9cb1d5a202
parent 5836
3374b92de2d9
child 5971
b8860472c377
     1.1 --- a/src/share/vm/oops/instanceKlass.hpp	Sun Oct 06 16:13:50 2013 +0200
     1.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Mon Oct 07 12:20:28 2013 -0400
     1.3 @@ -269,12 +269,18 @@
     1.4  
     1.5    // Method array.
     1.6    Array<Method*>* _methods;
     1.7 +  // Default Method Array, concrete methods inherited from interfaces
     1.8 +  Array<Method*>* _default_methods;
     1.9    // Interface (Klass*s) this class declares locally to implement.
    1.10    Array<Klass*>* _local_interfaces;
    1.11    // Interface (Klass*s) this class implements transitively.
    1.12    Array<Klass*>* _transitive_interfaces;
    1.13    // Int array containing the original order of method in the class file (for JVMTI).
    1.14    Array<int>*     _method_ordering;
    1.15 +  // Int array containing the vtable_indices for default_methods
    1.16 +  // offset matches _default_methods offset
    1.17 +  Array<int>*     _default_vtable_indices;
    1.18 +
    1.19    // Instance and static variable information, starts with 6-tuples of shorts
    1.20    // [access, name index, sig index, initval index, low_offset, high_offset]
    1.21    // for all fields, followed by the generic signature data at the end of
    1.22 @@ -356,6 +362,15 @@
    1.23    void set_method_ordering(Array<int>* m) { _method_ordering = m; }
    1.24    void copy_method_ordering(intArray* m, TRAPS);
    1.25  
    1.26 +  // default_methods
    1.27 +  Array<Method*>* default_methods() const  { return _default_methods; }
    1.28 +  void set_default_methods(Array<Method*>* a) { _default_methods = a; }
    1.29 +
    1.30 +  // default method vtable_indices
    1.31 +  Array<int>* default_vtable_indices() const { return _default_vtable_indices; }
    1.32 +  void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; }
    1.33 +  Array<int>* create_new_default_vtable_indices(int len, TRAPS);
    1.34 +
    1.35    // interfaces
    1.36    Array<Klass*>* local_interfaces() const          { return _local_interfaces; }
    1.37    void set_local_interfaces(Array<Klass*>* a)      {
    1.38 @@ -501,12 +516,18 @@
    1.39    Method* find_method(Symbol* name, Symbol* signature) const;
    1.40    static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
    1.41  
    1.42 +  // find a local method index in default_methods (returns -1 if not found)
    1.43 +  static int find_method_index(Array<Method*>* methods, Symbol* name, Symbol* signature);
    1.44 +
    1.45    // lookup operation (returns NULL if not found)
    1.46    Method* uncached_lookup_method(Symbol* name, Symbol* signature) const;
    1.47  
    1.48    // lookup a method in all the interfaces that this class implements
    1.49    // (returns NULL if not found)
    1.50    Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature) const;
    1.51 +  // lookup a method in local defaults then in all interfaces
    1.52 +  // (returns NULL if not found)
    1.53 +  Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const;
    1.54  
    1.55    // Find method indices by name.  If a method with the specified name is
    1.56    // found the index to the first method is returned, and 'end' is filled in
    1.57 @@ -910,6 +931,11 @@
    1.58    klassItable* itable() const;        // return new klassItable wrapper
    1.59    Method* method_at_itable(Klass* holder, int index, TRAPS);
    1.60  
    1.61 +#if INCLUDE_JVMTI
    1.62 +  void adjust_default_methods(Method** old_methods, Method** new_methods,
    1.63 +                              int methods_length, bool* trace_name_printed);
    1.64 +#endif // INCLUDE_JVMTI
    1.65 +
    1.66    // Garbage collection
    1.67    void oop_follow_contents(oop obj);
    1.68    int  oop_adjust_pointers(oop obj);

mercurial