1.1 --- a/src/share/vm/oops/instanceKlass.hpp Thu Nov 01 13:05:47 2012 +0100 1.2 +++ b/src/share/vm/oops/instanceKlass.hpp Thu Oct 11 12:25:42 2012 -0400 1.3 @@ -245,6 +245,10 @@ 1.4 unsigned char * _cached_class_file_bytes; // JVMTI: cached class file, before retransformable agent modified it in CFLH 1.5 jint _cached_class_file_len; // JVMTI: length of above 1.6 JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; // JVMTI: used during heap iteration 1.7 + 1.8 + // true if class, superclass, or implemented interfaces have default methods 1.9 + bool _has_default_methods; 1.10 + 1.11 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change 1.12 // Method array. 1.13 Array<Method*>* _methods; 1.14 @@ -492,6 +496,13 @@ 1.15 // (returns NULL if not found) 1.16 Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature) const; 1.17 1.18 + // Find method indices by name. If a method with the specified name is 1.19 + // found the index to the first method is returned, and 'end' is filled in 1.20 + // with the index of first non-name-matching method. If no method is found 1.21 + // -1 is returned. 1.22 + int find_method_by_name(Symbol* name, int* end); 1.23 + static int find_method_by_name(Array<Method*>* methods, Symbol* name, int* end); 1.24 + 1.25 // constant pool 1.26 ConstantPool* constants() const { return _constants; } 1.27 void set_constants(ConstantPool* c) { _constants = c; } 1.28 @@ -592,6 +603,9 @@ 1.29 return _jvmti_cached_class_field_map; 1.30 } 1.31 1.32 + bool has_default_methods() const { return _has_default_methods; } 1.33 + void set_has_default_methods(bool b) { _has_default_methods = b; } 1.34 + 1.35 // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available 1.36 inline u2 next_method_idnum(); 1.37 void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; } 1.38 @@ -728,7 +742,6 @@ 1.39 GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots); 1.40 bool compute_is_subtype_of(Klass* k); 1.41 bool can_be_primary_super_slow() const; 1.42 - Klass* java_super() const { return super(); } 1.43 int oop_size(oop obj) const { return size_helper(); } 1.44 bool oop_is_instance_slow() const { return true; } 1.45 1.46 @@ -750,6 +763,10 @@ 1.47 return (InstanceKlass*) k; 1.48 } 1.49 1.50 + InstanceKlass* java_super() const { 1.51 + return (super() == NULL) ? NULL : cast(super()); 1.52 + } 1.53 + 1.54 // Sizing (in words) 1.55 static int header_size() { return align_object_offset(sizeof(InstanceKlass)/HeapWordSize); } 1.56 static int size(int vtable_length, int itable_length,