< prev index next >
src/share/vm/oops/klassVtable.cpp
Print this page
*** 285,295 ****
// P1.C extends B, public m
// P1.C.m needs to override P1.A.m and can not override P2.B.m
// Therefore: all package private methods need their own vtable entries for
// them to be the root of an inheritance overriding decision
// Package private methods may also override other vtable entries
! InstanceKlass* klassVtable::find_transitive_override(InstanceKlass* initialsuper, methodHandle target_method,
int vtable_index, Handle target_loader, Symbol* target_classname, Thread * THREAD) {
InstanceKlass* superk = initialsuper;
while (superk != NULL && superk->super() != NULL) {
InstanceKlass* supersuperklass = InstanceKlass::cast(superk->super());
klassVtable ssVtable = supersuperklass->vtable();
--- 285,295 ----
// P1.C extends B, public m
// P1.C.m needs to override P1.A.m and can not override P2.B.m
// Therefore: all package private methods need their own vtable entries for
// them to be the root of an inheritance overriding decision
// Package private methods may also override other vtable entries
! InstanceKlass* klassVtable::find_transitive_override(InstanceKlass* initialsuper, const methodHandle& target_method,
int vtable_index, Handle target_loader, Symbol* target_classname, Thread * THREAD) {
InstanceKlass* superk = initialsuper;
while (superk != NULL && superk->super() != NULL) {
InstanceKlass* supersuperklass = InstanceKlass::cast(superk->super());
klassVtable ssVtable = supersuperklass->vtable();
*** 327,337 ****
}
return superk;
}
! static void log_vtables(int i, bool overrides, methodHandle target_method,
Klass* target_klass, Method* super_method,
Thread* thread) {
#ifndef PRODUCT
if (log_develop_is_enabled(Trace, vtables)) {
ResourceMark rm(thread);
--- 327,337 ----
}
return superk;
}
! static void log_vtables(int i, bool overrides, const methodHandle& target_method,
Klass* target_klass, Method* super_method,
Thread* thread) {
#ifndef PRODUCT
if (log_develop_is_enabled(Trace, vtables)) {
ResourceMark rm(thread);
*** 355,365 ****
// Update child's copy of super vtable for overrides
// OR return true if a new vtable entry is required.
// Only called for InstanceKlass's, i.e. not for arrays
// If that changed, could not use _klass as handle for klass
! bool klassVtable::update_inherited_vtable(InstanceKlass* klass, methodHandle target_method,
int super_vtable_len, int default_index,
bool checkconstraints, TRAPS) {
ResourceMark rm;
bool allocate_new = true;
assert(klass->is_instance_klass(), "must be InstanceKlass");
--- 355,365 ----
// Update child's copy of super vtable for overrides
// OR return true if a new vtable entry is required.
// Only called for InstanceKlass's, i.e. not for arrays
// If that changed, could not use _klass as handle for klass
! bool klassVtable::update_inherited_vtable(InstanceKlass* klass, const methodHandle& target_method,
int super_vtable_len, int default_index,
bool checkconstraints, TRAPS) {
ResourceMark rm;
bool allocate_new = true;
assert(klass->is_instance_klass(), "must be InstanceKlass");
*** 574,584 ****
// the vtables indices for a method. We cannot directly use that function because,
// we allocate the InstanceKlass at load time, and that requires that the
// superclass has been loaded.
// However, the vtable entries are filled in at link time, and therefore
// the superclass' vtable may not yet have been filled in.
! bool klassVtable::needs_new_vtable_entry(methodHandle target_method,
const Klass* super,
Handle classloader,
Symbol* classname,
AccessFlags class_flags,
u2 major_version,
--- 574,584 ----
// the vtables indices for a method. We cannot directly use that function because,
// we allocate the InstanceKlass at load time, and that requires that the
// superclass has been loaded.
// However, the vtable entries are filled in at link time, and therefore
// the superclass' vtable may not yet have been filled in.
! bool klassVtable::needs_new_vtable_entry(const methodHandle& target_method,
const Klass* super,
Handle classloader,
Symbol* classname,
AccessFlags class_flags,
u2 major_version,
< prev index next >