comparison src/share/vm/oops/klassVtable.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 b2e698d2276c
children
comparison
equal deleted inserted replaced
12822:cc4f5f8d885e 12823:ac9cb1d5a202
95 // If any entry of this vtable points to any of old_methods, 95 // If any entry of this vtable points to any of old_methods,
96 // replace it with the corresponding new_method. 96 // replace it with the corresponding new_method.
97 // trace_name_printed is set to true if the current call has 97 // trace_name_printed is set to true if the current call has
98 // printed the klass name so that other routines in the adjust_* 98 // printed the klass name so that other routines in the adjust_*
99 // group don't print the klass name. 99 // group don't print the klass name.
100 bool adjust_default_method(int vtable_index, Method* old_method, Method* new_method);
100 void adjust_method_entries(Method** old_methods, Method** new_methods, 101 void adjust_method_entries(Method** old_methods, Method** new_methods,
101 int methods_length, bool * trace_name_printed); 102 int methods_length, bool * trace_name_printed);
102 bool check_no_old_or_obsolete_entries(); 103 bool check_no_old_or_obsolete_entries();
103 void dump_vtable(); 104 void dump_vtable();
104 #endif // INCLUDE_JVMTI 105 #endif // INCLUDE_JVMTI
116 int initialize_from_super(KlassHandle super); 117 int initialize_from_super(KlassHandle super);
117 int index_of(Method* m, int len) const; // same as index_of, but search only up to len 118 int index_of(Method* m, int len) const; // same as index_of, but search only up to len
118 void put_method_at(Method* m, int index); 119 void put_method_at(Method* m, int index);
119 static bool needs_new_vtable_entry(methodHandle m, Klass* super, Handle classloader, Symbol* classname, AccessFlags access_flags, TRAPS); 120 static bool needs_new_vtable_entry(methodHandle m, Klass* super, Handle classloader, Symbol* classname, AccessFlags access_flags, TRAPS);
120 121
121 bool update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len, bool checkconstraints, TRAPS); 122 bool update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len, int default_index, bool checkconstraints, TRAPS);
122 InstanceKlass* find_transitive_override(InstanceKlass* initialsuper, methodHandle target_method, int vtable_index, 123 InstanceKlass* find_transitive_override(InstanceKlass* initialsuper, methodHandle target_method, int vtable_index,
123 Handle target_loader, Symbol* target_classname, Thread* THREAD); 124 Handle target_loader, Symbol* target_classname, Thread* THREAD);
124 125
125 // support for miranda methods 126 // support for miranda methods
126 bool is_miranda_entry_at(int i); 127 bool is_miranda_entry_at(int i);
127 int fill_in_mirandas(int initialized); 128 int fill_in_mirandas(int initialized);
128 static bool is_miranda(Method* m, Array<Method*>* class_methods, Klass* super); 129 static bool is_miranda(Method* m, Array<Method*>* class_methods,
130 Array<Method*>* default_methods, Klass* super);
129 static void add_new_mirandas_to_lists( 131 static void add_new_mirandas_to_lists(
130 GrowableArray<Method*>* new_mirandas, 132 GrowableArray<Method*>* new_mirandas,
131 GrowableArray<Method*>* all_mirandas, 133 GrowableArray<Method*>* all_mirandas,
132 Array<Method*>* current_interface_methods, Array<Method*>* class_methods, 134 Array<Method*>* current_interface_methods,
135 Array<Method*>* class_methods,
136 Array<Method*>* default_methods,
133 Klass* super); 137 Klass* super);
134 static void get_mirandas( 138 static void get_mirandas(
135 GrowableArray<Method*>* new_mirandas, 139 GrowableArray<Method*>* new_mirandas,
136 GrowableArray<Method*>* all_mirandas, Klass* super, 140 GrowableArray<Method*>* all_mirandas, Klass* super,
137 Array<Method*>* class_methods, Array<Klass*>* local_interfaces); 141 Array<Method*>* class_methods,
138 142 Array<Method*>* default_methods,
143 Array<Klass*>* local_interfaces);
139 void verify_against(outputStream* st, klassVtable* vt, int index); 144 void verify_against(outputStream* st, klassVtable* vt, int index);
140 inline InstanceKlass* ik() const; 145 inline InstanceKlass* ik() const;
141 }; 146 };
142 147
143 148
288 bool check_no_old_or_obsolete_entries(); 293 bool check_no_old_or_obsolete_entries();
289 void dump_itable(); 294 void dump_itable();
290 #endif // INCLUDE_JVMTI 295 #endif // INCLUDE_JVMTI
291 296
292 // Setup of itable 297 // Setup of itable
293 static int assign_itable_indexes_for_interface(Klass* klass); 298 static int assign_itable_indices_for_interface(Klass* klass);
294 static int method_count_for_interface(Klass* klass); 299 static int method_count_for_interface(Klass* klass);
295 static int compute_itable_size(Array<Klass*>* transitive_interfaces); 300 static int compute_itable_size(Array<Klass*>* transitive_interfaces);
296 static void setup_itable_offset_table(instanceKlassHandle klass); 301 static void setup_itable_offset_table(instanceKlassHandle klass);
297 302
298 // Resolving of method to index 303 // Resolving of method to index